UnconfigurableFixer.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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\Test\AbstractFixerTest;
  12. use PhpCsFixer\AbstractFixer;
  13. use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
  14. use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
  15. use PhpCsFixer\Tokenizer\Tokens;
  16. /**
  17. * @internal
  18. */
  19. final class UnconfigurableFixer extends AbstractFixer
  20. {
  21. public function getDefinition(): FixerDefinitionInterface
  22. {
  23. throw new \LogicException('Not implemented.');
  24. }
  25. public function isCandidate(Tokens $tokens): bool
  26. {
  27. return true;
  28. }
  29. public function doSomethingWithCreateConfigDefinition(): FixerConfigurationResolverInterface
  30. {
  31. return $this->createConfigurationDefinition();
  32. }
  33. protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
  34. {
  35. }
  36. }