FakeDiffer.php 624 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /*
  3. * This file is part of PHP CS Fixer.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. * Dariusz Rumiński <dariusz.ruminski@gmail.com>
  7. *
  8. * This source file is subject to the MIT license that is bundled
  9. * with this source code in the file LICENSE.
  10. */
  11. namespace PhpCsFixer\Tests\Fixtures;
  12. use PhpCsFixer\Differ\DifferInterface;
  13. /**
  14. * @internal
  15. */
  16. final class FakeDiffer implements DifferInterface
  17. {
  18. public ?\SplFileInfo $passedFile;
  19. public function diff(string $old, string $new, \SplFileInfo $file = null): string
  20. {
  21. $this->passedFile = $file;
  22. return 'some-diff';
  23. }
  24. }