You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.2 KiB

3 years ago
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Console\Formatter;
  11. /**
  12. * @author Tien Xuan Vo <tien.xuan.vo@gmail.com>
  13. */
  14. final class NullOutputFormatterStyle implements OutputFormatterStyleInterface
  15. {
  16. /**
  17. * {@inheritdoc}
  18. */
  19. public function apply(string $text): string
  20. {
  21. return $text;
  22. }
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public function setBackground(string $color = null): void
  27. {
  28. // do nothing
  29. }
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public function setForeground(string $color = null): void
  34. {
  35. // do nothing
  36. }
  37. /**
  38. * {@inheritdoc}
  39. */
  40. public function setOption(string $option): void
  41. {
  42. // do nothing
  43. }
  44. /**
  45. * {@inheritdoc}
  46. */
  47. public function setOptions(array $options): void
  48. {
  49. // do nothing
  50. }
  51. /**
  52. * {@inheritdoc}
  53. */
  54. public function unsetOption(string $option): void
  55. {
  56. // do nothing
  57. }
  58. }