true]; /** * @param string $expected * @param null|string $input * * @dataProvider provideFixCases */ public function testFix($expected, $input = null) { $this->doTest($expected, $input); } /** * @param string $expected * @param null|string $input * * @dataProvider provideFix70Cases * @requires PHP 7.0 */ public function testFix70($expected, $input = null, array $configuration = null) { if ($configuration !== null) { $this->fixer->configure($configuration); } $this->doTest($expected, $input); } public function provideFixCases() { return [ [ 'foo;', 'foo;', ], [ 'bar))->foo;', 'bar))->foo;', ], [ ' new DateTime(), );', ' new DateTime, );', ], [ ' new DateTime() );', ' new DateTime );', ], [ ' ', '', ], [ '> 1; ', '> 1; ', ], [ ' $this->startDate) {} if (new DateTime() >= $this->startDate) {} if (new DateTime() < $this->startDate) {} if (new DateTime() <= $this->startDate) {} if (new DateTime() == $this->startDate) {} if (new DateTime() != $this->startDate) {} if (new DateTime() <> $this->startDate) {} if (new DateTime() === $this->startDate) {} if (new DateTime() !== $this->startDate) {} ', ' $this->startDate) {} if (new DateTime >= $this->startDate) {} if (new DateTime < $this->startDate) {} if (new DateTime <= $this->startDate) {} if (new DateTime == $this->startDate) {} if (new DateTime != $this->startDate) {} if (new DateTime <> $this->startDate) {} if (new DateTime === $this->startDate) {} if (new DateTime !== $this->startDate) {} ', ], [ ' 1];', ' 1];', ], [ ' new DateTime(), ];', ' new DateTime, ];', ], [ ' new DateTime() ];', ' new DateTime ];', ], [ ' 1; ', ' 1; ', ], [ ' ', ' ', ], [ '