SimpleWhitespacesAwareFixer.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4. * This file is part of PHP CS Fixer.
  5. *
  6. * (c) Fabien Potencier <fabien@symfony.com>
  7. * Dariusz Rumiński <dariusz.ruminski@gmail.com>
  8. *
  9. * This source file is subject to the MIT license that is bundled
  10. * with this source code in the file LICENSE.
  11. */
  12. namespace PhpCsFixer\Tests\Fixtures\Test\AbstractProxyFixerTest;
  13. use PhpCsFixer\Fixer\WhitespacesAwareFixerInterface;
  14. use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
  15. use PhpCsFixer\Tokenizer\Tokens;
  16. use PhpCsFixer\WhitespacesFixerConfig;
  17. /**
  18. * @internal
  19. */
  20. final class SimpleWhitespacesAwareFixer implements WhitespacesAwareFixerInterface
  21. {
  22. /**
  23. * @var null|WhitespacesFixerConfig
  24. */
  25. private $whitespacesConfig;
  26. public function getDefinition(): FixerDefinitionInterface
  27. {
  28. throw new \BadMethodCallException('Not implemented.');
  29. }
  30. public function fix(\SplFileInfo $file, Tokens $tokens): void
  31. {
  32. throw new \BadMethodCallException('Not implemented.');
  33. }
  34. public function getName(): string
  35. {
  36. return uniqid('abstract_proxy_aware_test_');
  37. }
  38. public function getPriority(): int
  39. {
  40. return 1;
  41. }
  42. public function getWhitespacesFixerConfig(): ?WhitespacesFixerConfig
  43. {
  44. return $this->whitespacesConfig;
  45. }
  46. public function isCandidate(Tokens $tokens): bool
  47. {
  48. throw new \BadMethodCallException('Not implemented.');
  49. }
  50. public function isRisky(): bool
  51. {
  52. throw new \BadMethodCallException('Not implemented.');
  53. }
  54. public function setWhitespacesConfig(WhitespacesFixerConfig $config): void
  55. {
  56. $this->whitespacesConfig = $config;
  57. }
  58. public function supports(\SplFileInfo $file): bool
  59. {
  60. throw new \BadMethodCallException('Not implemented.');
  61. }
  62. }