File tree Expand file tree Collapse file tree
rules/TypeDeclaration/Rector/ClassMethod Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010use PhpParser \Node \Stmt \Class_ ;
1111use Rector \Rector \AbstractRector ;
1212use Rector \ValueObject \MethodName ;
13+ <<<<<<< HEAD
1314use Rector \VendorLocker \ParentClassMethodTypeOverrideGuard;
15+ =======
16+ use Rector \ValueObject \PhpVersionFeature ;
17+ use Rector \VersionBonding \Contract \MinPhpVersionInterface ;
18+ >>>>>>> 971356 b355 (add scalar types condition)
1419use Symplify \RuleDocGenerator \ValueObject \CodeSample \CodeSample;
1520use Symplify \RuleDocGenerator \ValueObject \RuleDefinition ;
1621
1924 *
2025 * @see https://www.php.net/manual/en/language.oop5.overloading.php#object.call
2126 */
22- final class KnownMagicClassMethodTypeRector extends AbstractRector
27+ final class KnownMagicClassMethodTypeRector extends AbstractRector implements MinPhpVersionInterface
2328{
2429 public function __construct (
2530 private readonly ParentClassMethodTypeOverrideGuard $ parentClassMethodTypeOverrideGuard
@@ -100,4 +105,9 @@ public function refactor(Node $node): ?Node
100105
101106 return null ;
102107 }
108+
109+ public function provideMinPhpVersion (): int
110+ {
111+ return PhpVersionFeature::SCALAR_TYPES ;
112+ }
103113}
You can’t perform that action at this time.
0 commit comments