Remove some unused codes & adjust the license headers
This commit is contained in:
parent
e45c53ac3c
commit
9ac1a00e94
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
/* Icinga Web 2 | (c) 2022 Icinga GmbH | GPLv2+ */
|
||||
|
||||
namespace Icinga\Less;
|
||||
|
||||
use Less_Tree_Call;
|
||||
|
@ -59,6 +61,7 @@ class Call extends Less_Tree_Call
|
|||
}
|
||||
|
||||
$arg->value[0] = $vr;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Icinga Web 2 | (c) 2022 Icinga Development Team | GPLv2+ */
|
||||
/* Icinga Web 2 | (c) 2022 Icinga GmbH | GPLv2+ */
|
||||
|
||||
namespace Icinga\Less;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Icinga Web 2 | (c) 2022 Icinga Development Team | GPLv2+ */
|
||||
/* Icinga Web 2 | (c) 2022 Icinga GmbH | GPLv2+ */
|
||||
|
||||
namespace Icinga\Less;
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
/* Icinga Web 2 | (c) 2022 Icinga GmbH | GPLv2+ */
|
||||
|
||||
namespace Icinga\Less;
|
||||
|
||||
use Less_Exception_Compiler;
|
||||
|
@ -79,7 +81,7 @@ class DeferredColorProp extends Less_Tree_Variable
|
|||
return $this;
|
||||
}
|
||||
|
||||
if ($this->evaluating) {
|
||||
if ($this->evaluating) { // Just like the parent method
|
||||
throw new Less_Exception_Compiler(
|
||||
"Recursive variable definition for " . $this->name,
|
||||
null,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Icinga Web 2 | (c) 2022 Icinga Development Team | GPLv2+ */
|
||||
/* Icinga Web 2 | (c) 2022 Icinga GmbH | GPLv2+ */
|
||||
|
||||
namespace Icinga\Less;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Icinga Web 2 | (c) 2022 Icinga Development Team | GPLv2+ */
|
||||
/* Icinga Web 2 | (c) 2022 Icinga GmbH | GPLv2+ */
|
||||
|
||||
namespace Icinga\Less;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Icinga Web 2 | (c) 2022 Icinga Development Team | GPLv2+ */
|
||||
/* Icinga Web 2 | (c) 2022 Icinga GmbH | GPLv2+ */
|
||||
|
||||
namespace Icinga\Less;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Icinga Web 2 | (c) 2022 Icinga Development Team | GPLv2+ */
|
||||
/* Icinga Web 2 | (c) 2022 Icinga GmbH | GPLv2+ */
|
||||
|
||||
namespace Icinga\Less;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Icinga Web 2 | (c) 2022 Icinga Development Team | GPLv2+ */
|
||||
/* Icinga Web 2 | (c) 2022 Icinga GmbH | GPLv2+ */
|
||||
|
||||
namespace Icinga\Less;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Icinga Web 2 | (c) 2022 Icinga Development Team | GPLv2+ */
|
||||
/* Icinga Web 2 | (c) 2022 Icinga GmbH | GPLv2+ */
|
||||
|
||||
namespace Icinga\Less;
|
||||
|
||||
|
@ -65,13 +65,7 @@ CSS;
|
|||
|
||||
public function visitCall($c)
|
||||
{
|
||||
if ($c->name === 'var') {
|
||||
if ($this->callingVar !== false) {
|
||||
throw new LogicException('Already calling var');
|
||||
}
|
||||
|
||||
$this->callingVar = spl_object_hash($c);
|
||||
} else {
|
||||
if ($c->name !== 'var') {
|
||||
// We need to use our own tree call class , so that we can precompile the arguments before making
|
||||
// the actual LESS function calls. Otherwise, it will produce lots of invalid argument exceptions!
|
||||
$c = Call::fromCall($c);
|
||||
|
@ -80,13 +74,6 @@ CSS;
|
|||
return $c;
|
||||
}
|
||||
|
||||
public function visitCallOut($c)
|
||||
{
|
||||
if ($this->callingVar !== false && $this->callingVar === spl_object_hash($c)) {
|
||||
$this->callingVar = false;
|
||||
}
|
||||
}
|
||||
|
||||
public function visitDetachedRuleset($drs)
|
||||
{
|
||||
if ($this->variableOrigin->name === '@' . static::LIGHT_MODE_NAME) {
|
||||
|
@ -194,7 +181,7 @@ CSS;
|
|||
|
||||
public function visitVariable($v)
|
||||
{
|
||||
if ($this->callingVar !== false || $this->definingVariable !== false) {
|
||||
if ($this->definingVariable !== false) {
|
||||
return $v;
|
||||
}
|
||||
|
||||
|
@ -205,6 +192,7 @@ CSS;
|
|||
public function visitColor($c)
|
||||
{
|
||||
if ($this->definingVariable !== false) {
|
||||
// Make sure that all less tree colors do have a proper name
|
||||
$c->name = $this->variableOrigin->name;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue