NullOutputFormatterStyle.php 953 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. public function apply(string $text): string
  17. {
  18. return $text;
  19. }
  20. public function setBackground(?string $color): void
  21. {
  22. // do nothing
  23. }
  24. public function setForeground(?string $color): void
  25. {
  26. // do nothing
  27. }
  28. public function setOption(string $option): void
  29. {
  30. // do nothing
  31. }
  32. public function setOptions(array $options): void
  33. {
  34. // do nothing
  35. }
  36. public function unsetOption(string $option): void
  37. {
  38. // do nothing
  39. }
  40. }