TestToolInfo.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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\Console;
  13. use PhpCsFixer\Console\Application;
  14. use PhpCsFixer\ToolInfoInterface;
  15. /**
  16. * @internal
  17. */
  18. final class TestToolInfo implements ToolInfoInterface
  19. {
  20. public function getComposerInstallationDetails(): array
  21. {
  22. throw new \BadMethodCallException();
  23. }
  24. public function getComposerVersion(): string
  25. {
  26. throw new \BadMethodCallException();
  27. }
  28. public function getVersion(): string
  29. {
  30. return Application::VERSION;
  31. }
  32. public function isInstalledAsPhar(): bool
  33. {
  34. return true;
  35. }
  36. public function isInstalledByComposer(): bool
  37. {
  38. throw new \BadMethodCallException();
  39. }
  40. public function getPharDownloadUri(string $version): string
  41. {
  42. throw new \BadMethodCallException();
  43. }
  44. }