* 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\Test; /** * @internal */ final class TestCaseUtils { /** * @param iterable $cases * * @return iterable */ public static function swapExpectedInputTestCases(iterable $cases): iterable { foreach ($cases as $case) { if (1 === \count($case)) { yield $case; continue; } [$case[0], $case[1]] = [$case[1], $case[0]]; yield $case; } } }