Skip to content

Commit 8ca8a8d

Browse files
onairmarcEncoreBot
andauthored
Fix Type Compatibility (#112)
Co-authored-by: EncoreBot <[email protected]>
1 parent e6747dc commit 8ca8a8d

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ e85fae4f7290329ac9cfae159e19c1bb55062e4b
4646
7bb064715cf4fb35fd1c9add945addb3959405c4
4747
5bd6cc77c40f19059dbdda4704d2f380099b29e3eb7e6e7d13e3fe753ae5219fb67452e15cd90c65
4848
7e6e995f8e32353104b95c1b4394faf1bf030dbb
49+
7c5048a7fbbb03da35cfd216c9ccb0701056a073

src/Objects/Support/Traits/Macroable.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Closure;
1212
use Illuminate\Database\Eloquent\Model;
1313
use ReflectionClass;
14+
use ReflectionException;
1415
use ReflectionMethod;
1516

1617
/** @experimental */
@@ -86,7 +87,14 @@ protected function deferToEloquentInstance(string $method, array $parameters): m
8687
throw new BadMethodCallException(sprintf("Method %s::%s does not exist.", static::class, $method));
8788
}
8889

89-
public static function __callStatic(string $method, array $parameters): mixed
90+
/**
91+
* @param string $method
92+
* @param array $parameters
93+
* @return mixed
94+
*
95+
* @throws ReflectionException
96+
*/
97+
public static function __callStatic($method, $parameters)
9098
{
9199
// Check if a macro exists for the method
92100
if (static::hasMacro($method)) {
@@ -113,7 +121,14 @@ public static function __callStatic(string $method, array $parameters): mixed
113121
throw new BadMethodCallException(sprintf("Method %s::%s does not exist.", static::class, $method));
114122
}
115123

116-
public function __call(string $method, array $parameters): mixed
124+
/**
125+
* @param string $method
126+
* @param array $parameters
127+
* @return mixed
128+
*
129+
* @throws ReflectionException
130+
*/
131+
public function __call($method, $parameters)
117132
{
118133
// Check if a macro exists for the method
119134
if (static::hasMacro($method)) {

0 commit comments

Comments
 (0)