* Dariusz Rumiński * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace PhpCsFixer\Tests\Fixer\ReturnNotation; use PhpCsFixer\Tests\Test\AbstractFixerTestCase; /** * @author SpacePossum * * @internal * * @covers \PhpCsFixer\Fixer\ReturnNotation\ReturnAssignmentFixer */ final class ReturnAssignmentFixerTest extends AbstractFixerTestCase { /** * @dataProvider provideFixNestedFunctionsCases * * @param string $expected * @param string $input */ public function testFixNestedFunctions($expected, $input) { $this->doTest($expected, $input); } public function provideFixNestedFunctionsCases() { return [ [ 'doTest($expected, $input); } public function provideFixCases() { return [ [ ' [ ' [ '1){echo 1;} return (1 + 2 + $b); }', '1){echo 1;} $a= (1 + 2 + $b);return $a; }', ], [ ' doTest($expected); } public function provideDoNotFixCases() { return [ 'static' => [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ ' [ '