File manager - Edit - /home/ferretapmx/public_html/plugins/system/helixultimate/core/classes/scss/Formatter/Expanded.php
Back
<?php /** * SCSSPHP * * @copyright 2012-2017 Leaf Corcoran * * @license http://opensource.org/licenses/MIT MIT * * @link http://leafo.github.io/scssphp */ namespace Leafo\ScssPhp\Formatter; use Leafo\ScssPhp\Formatter; use Leafo\ScssPhp\Formatter\OutputBlock; /** * Expanded formatter * * @author Leaf Corcoran <leafot@gmail.com> */ class Expanded extends Formatter { /** * {@inheritdoc} */ public function __construct() { $this->indentLevel = 0; $this->indentChar = ' '; $this->break = "\n"; $this->open = ' {'; $this->close = '}'; $this->tagSeparator = ', '; $this->assignSeparator = ': '; $this->keepSemicolons = true; } /** * {@inheritdoc} */ protected function indentStr() { return str_repeat($this->indentChar, $this->indentLevel); } /** * {@inheritdoc} */ protected function blockLines(OutputBlock $block) { $inner = $this->indentStr(); $glue = $this->break . $inner; foreach ($block->lines as $index => $line) { if (substr($line, 0, 2) === '/*') { $block->lines[$index] = preg_replace('/(\r|\n)+/', $glue, $line); } } echo $inner . implode($glue, $block->lines); if (empty($block->selectors) || ! empty($block->children)) { echo $this->break; } } }
| ver. 1.4 |
Github
|
.
| PHP 8.2.32 | Generation time: 0.06 |
proxy
|
phpinfo
|
Settings