fixer->configure([ 'variables' => true, 'defaults' => true, ]); $this->doTest($expected, $input); } public function provideTrueCases(): iterable { yield 'empty function' => [ ' [ ' [ ' [ ' $b; ', ]; yield 'function, no defaults' => [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' $int; ', ' $int; ', ]; } /** * @dataProvider provideFalseCases */ public function testBothFalse(string $expected, ?string $input = null): void { $this->fixer->configure([ 'variables' => false, 'defaults' => false, ]); $this->doTest($expected, $input); } public function provideFalseCases(): iterable { foreach ($this->provideTrueCases() as $key => $case) { if (isset($case[1])) { yield $key => [$case[1], $case[0]]; } else { yield $key => $case; } } } /** * @dataProvider provideNullCases */ public function testBothNull(string $expected, ?string $input = null): void { $this->fixer->configure([ 'variables' => null, 'defaults' => null, ]); $this->doTest($expected, $input); } public function provideNullCases(): iterable { foreach ($this->provideFalseCases() as $key => $case) { yield $key => [$case[0]]; } } protected function createFixer(): AbstractFixer { return new AlignMultilineParametersFixer(); } }