Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ d0097bd14bf964bf4c283d07432ca52bfefa6391
0dc3de71ae8b40a7050bd1a106d31c216b9fc7d3
430e41cb40dcd692360456fdd390c898bba8bd97
529667d80354f37d222563c9b37cff8b2e9cc3e5
5c2330998a6353dae2cc267b6deeef5e5d7a8c63
6 changes: 3 additions & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByMethodCallTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByParentCallTypeRector;

function skipTypeHintsForMacroable(): array
function skipTypeHintsForMagicMethods(): array
{
$paramTypeRules = array_filter([
AddMethodCallBasedStrictParamTypeRector::class,
Expand All @@ -22,7 +22,7 @@ function skipTypeHintsForMacroable(): array
], "class_exists");

return array_fill_keys($paramTypeRules, [
"*Macroable.php::__callStatic",
__DIR__ . "/src/Objects/Support/Traits/Macroable.php",
]);
}

Expand All @@ -31,4 +31,4 @@ function skipTypeHintsForMacroable(): array
__DIR__ . "/src",
])
->withRules(Rector::rules())
->withSkip(skipTypeHintsForMacroable());
->withSkip(skipTypeHintsForMagicMethods());
3 changes: 2 additions & 1 deletion src/Objects/Support/Traits/Macroable.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@ protected function deferToEloquentInstance(string $method, array $parameters): m

/**
* @param string $method
* @param array $parameters
* @return mixed
*
* @throws ReflectionException
*/
public static function __callStatic($method, array $parameters)
public static function __callStatic($method, $parameters)
{
// Check if a macro exists for the method
if (static::hasMacro($method)) {
Expand Down