From c384c3f7e4f137800e85a317fe368b6bb93c07ac Mon Sep 17 00:00:00 2001 From: Marc Beinder Date: Sat, 17 Jan 2026 10:12:12 -0600 Subject: [PATCH 1/3] Refactor type hints in Macroable methods and update skip rules in rector configuration --- rector.php | 6 +++--- src/Objects/Support/Traits/Macroable.php | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rector.php b/rector.php index 2381dc1..f6a7dc7 100644 --- a/rector.php +++ b/rector.php @@ -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, @@ -22,7 +22,7 @@ function skipTypeHintsForMacroable(): array ], "class_exists"); return array_fill_keys($paramTypeRules, [ - "*Macroable.php::__callStatic", + __DIR__ . "/src/Objects/Support/Traits/Macroable.php", ]); } @@ -31,4 +31,4 @@ function skipTypeHintsForMacroable(): array __DIR__ . "/src", ]) ->withRules(Rector::rules()) - ->withSkip(skipTypeHintsForMacroable()); + ->withSkip(skipTypeHintsForMagicMethods()); diff --git a/src/Objects/Support/Traits/Macroable.php b/src/Objects/Support/Traits/Macroable.php index 7d40b14..ed7a042 100644 --- a/src/Objects/Support/Traits/Macroable.php +++ b/src/Objects/Support/Traits/Macroable.php @@ -88,12 +88,12 @@ protected function deferToEloquentInstance(string $method, array $parameters): m } /** - * @param string $method + * @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)) { @@ -121,8 +121,8 @@ public static function __callStatic($method, array $parameters) } /** - * @param string $method - * @param array $parameters + * @param string $method + * @param array $parameters * @return mixed * * @throws ReflectionException From 5c2330998a6353dae2cc267b6deeef5e5d7a8c63 Mon Sep 17 00:00:00 2001 From: EncoreBot Date: Sat, 17 Jan 2026 16:16:37 +0000 Subject: [PATCH 2/3] Dusting --- src/Objects/Support/Traits/Macroable.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Objects/Support/Traits/Macroable.php b/src/Objects/Support/Traits/Macroable.php index ed7a042..14bdd96 100644 --- a/src/Objects/Support/Traits/Macroable.php +++ b/src/Objects/Support/Traits/Macroable.php @@ -88,9 +88,10 @@ protected function deferToEloquentInstance(string $method, array $parameters): m } /** - * @param string $method - * @param array $parameters + * @param string $method + * @param array $parameters * @return mixed + * * @throws ReflectionException */ public static function __callStatic($method, $parameters) @@ -121,8 +122,8 @@ public static function __callStatic($method, $parameters) } /** - * @param string $method - * @param array $parameters + * @param string $method + * @param array $parameters * @return mixed * * @throws ReflectionException From 2aa0a5889b40a84d1996141a36be1c055e0f7cd9 Mon Sep 17 00:00:00 2001 From: EncoreBot Date: Sat, 17 Jan 2026 16:16:37 +0000 Subject: [PATCH 3/3] Ignore Duster Commit in Git Blame --- .git-blame-ignore-revs | 1 + 1 file changed, 1 insertion(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index e07c587..e3cf6ee 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -63,3 +63,4 @@ d0097bd14bf964bf4c283d07432ca52bfefa6391 0dc3de71ae8b40a7050bd1a106d31c216b9fc7d3 430e41cb40dcd692360456fdd390c898bba8bd97 529667d80354f37d222563c9b37cff8b2e9cc3e5 +5c2330998a6353dae2cc267b6deeef5e5d7a8c63