/lib/scssphp/Formatter/Compact.php

https://bitbucket.org/moodle/moodle · PHP · 50 lines · 22 code · 6 blank · 22 comment · 0 complexity · 94ff2d601a5d67cd21c01f6ce5018389 MD5 · raw file

  1. <?php
  2. /**
  3. * SCSSPHP
  4. *
  5. * @copyright 2012-2020 Leaf Corcoran
  6. *
  7. * @license http://opensource.org/licenses/MIT MIT
  8. *
  9. * @link http://scssphp.github.io/scssphp
  10. */
  11. namespace ScssPhp\ScssPhp\Formatter;
  12. use ScssPhp\ScssPhp\Formatter;
  13. /**
  14. * Compact formatter
  15. *
  16. * @author Leaf Corcoran <leafot@gmail.com>
  17. *
  18. * @deprecated since 1.4.0. Use the Compressed formatter instead.
  19. */
  20. class Compact extends Formatter
  21. {
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public function __construct()
  26. {
  27. @trigger_error('The Compact formatter is deprecated since 1.4.0. Use the Compressed formatter instead.', E_USER_DEPRECATED);
  28. $this->indentLevel = 0;
  29. $this->indentChar = '';
  30. $this->break = '';
  31. $this->open = ' {';
  32. $this->close = "}\n\n";
  33. $this->tagSeparator = ',';
  34. $this->assignSeparator = ':';
  35. $this->keepSemicolons = true;
  36. }
  37. /**
  38. * {@inheritdoc}
  39. */
  40. public function indentStr()
  41. {
  42. return ' ';
  43. }
  44. }