33namespace MessagePack ;
44
55use PhpCsFixer \Config ;
6- use PhpCsFixer \Fixer \ConstantNotation \NativeConstantInvocationFixer ;
76use PhpCsFixer \Fixer \FixerInterface ;
7+ use PhpCsFixer \Fixer \ConstantNotation \NativeConstantInvocationFixer ;
88use PhpCsFixer \Fixer \FunctionNotation \NativeFunctionInvocationFixer ;
9+ use PhpCsFixer \FixerDefinition \FixerDefinition ;
10+ use PhpCsFixer \FixerDefinition \FixerDefinitionInterface ;
911use PhpCsFixer \Tokenizer \Tokens ;
1012
1113final class FilterableFixer implements FixerInterface
1214{
13- private $ fixer ;
14- private $ pathRegex ;
15+ private FixerInterface $ fixer ;
16+ private string $ pathRegex ;
1517
1618 public function __construct (FixerInterface $ fixer , string $ pathRegex )
1719 {
@@ -52,7 +54,12 @@ public function supports(\SplFileInfo $file) : bool
5254
5355 return $ this ->fixer ->supports ($ file );
5456 }
55- };
57+
58+ public function getDefinition () : FixerDefinitionInterface
59+ {
60+ return $ this ->fixer ->getDefinition ();
61+ }
62+ }
5663
5764$ header = <<<EOF
5865This file is part of the rybakit/msgpack.php package.
@@ -63,7 +70,7 @@ public function supports(\SplFileInfo $file) : bool
6370file that was distributed with this source code.
6471EOF ;
6572
66- return Config:: create ( )
73+ return ( new Config () )
6774 ->setUsingCache (false )
6875 ->setRiskyAllowed (true )
6976 ->registerCustomFixers ([
@@ -75,7 +82,7 @@ public function supports(\SplFileInfo $file) : bool
7582 '@Symfony:risky ' => true ,
7683 'array_syntax ' => ['syntax ' => 'short ' ],
7784 'binary_operator_spaces ' => ['operators ' => ['= ' => null , '=> ' => null ]],
78- 'is_null ' => false , // https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/4015
85+ 'is_null ' => false ,
7986 'native_constant_invocation ' => false ,
8087 'native_function_invocation ' => false ,
8188 'FilterableFixer/native_constant_invocation ' => true ,
0 commit comments