|
@@ -115,4 +115,30 @@ final class WhitespaceAfterCommaInArrayFixerTest extends AbstractFixerTestCase
|
|
|
],
|
|
|
];
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ * @param string $expected
|
|
|
+ * @param null|string $input
|
|
|
+ *
|
|
|
+ * @dataProvider provideFixPhp74Cases
|
|
|
+ * @requires PHP 7.4
|
|
|
+ */
|
|
|
+ public function testFixPhp74($expected, $input = null)
|
|
|
+ {
|
|
|
+ $this->doTest($expected, $input);
|
|
|
+ }
|
|
|
+
|
|
|
+ public function provideFixPhp74Cases()
|
|
|
+ {
|
|
|
+ return [
|
|
|
+ [
|
|
|
+ '<?php $x = array(...$foo, ...$bar);',
|
|
|
+ '<?php $x = array(...$foo,...$bar);',
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ '<?php $x = [...$foo, ...$bar];',
|
|
|
+ '<?php $x = [...$foo,...$bar];',
|
|
|
+ ],
|
|
|
+ ];
|
|
|
+ }
|
|
|
}
|