|
@@ -1634,4 +1634,47 @@ class A
|
|
|
'<?php trait Foo { protected $abc = "abc"; const C1 = 1; }',
|
|
|
];
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param _AutogeneratedInputConfiguration $configuration
|
|
|
+ *
|
|
|
+ * @dataProvider provideFix83Cases
|
|
|
+ *
|
|
|
+ * @requires PHP 8.3
|
|
|
+ */
|
|
|
+ public function testFix83(string $expected, ?string $input = null, array $configuration = []): void
|
|
|
+ {
|
|
|
+ $this->fixer->configure($configuration);
|
|
|
+ $this->doTest($expected, $input);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return iterable<array{string, string, _AutogeneratedInputConfiguration}>
|
|
|
+ */
|
|
|
+ public static function provideFix83Cases(): iterable
|
|
|
+ {
|
|
|
+ yield [
|
|
|
+ <<<'PHP'
|
|
|
+ <?php
|
|
|
+ class Foo
|
|
|
+ {
|
|
|
+ public const int A = 42;
|
|
|
+ public const string B = 'bravo';
|
|
|
+ public const bool C = true;
|
|
|
+ }
|
|
|
+ PHP,
|
|
|
+ <<<'PHP'
|
|
|
+ <?php
|
|
|
+ class Foo
|
|
|
+ {
|
|
|
+ public const string B = 'bravo';
|
|
|
+ public const bool C = true;
|
|
|
+ public const int A = 42;
|
|
|
+ }
|
|
|
+ PHP,
|
|
|
+ [
|
|
|
+ 'sort_algorithm' => 'alpha',
|
|
|
+ ],
|
|
|
+ ];
|
|
|
+ }
|
|
|
}
|