for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LesserPhp\Compiler\Value;
/**
* lesserphp
* https://www.maswaba.de/lesserphp
*
* LESS CSS compiler, adapted from http://lesscss.org
* Copyright 2013, Leaf Corcoran <[email protected]>
* Copyright 2016, Marcus Schwarz <[email protected]>
* Copyright 2017, Stefan Pöhner <[email protected]>
* Licensed under MIT or GPLv3, see LICENSE
* @package LesserPhp
*/
class StringValue extends AbstractValue
{
private $delimiter, $content;
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.
* @inheritdoc
public function getCompiled()
$content = $this->content;
foreach ($content as &$part) {
if (is_array($part)) {
$part = $this->compiler->compileValue($part);
}
return $this->delimiter . implode($content) . $this->delimiter;
public function initializeFromOldFormat(array $value)
$this->delimiter=$value[1];
$this->content=$value[2];
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.