mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
Re-dump autoloader and composer.lock
This commit is contained in:
0
lib/scssphp/scssphp/bin/pscss
Normal file → Executable file
0
lib/scssphp/scssphp/bin/pscss
Normal file → Executable file
@@ -13,6 +13,7 @@
|
||||
namespace ScssPhp\ScssPhp\Block;
|
||||
|
||||
use ScssPhp\ScssPhp\Block;
|
||||
use ScssPhp\ScssPhp\Node\Number;
|
||||
use ScssPhp\ScssPhp\Type;
|
||||
|
||||
/**
|
||||
@@ -26,7 +27,7 @@ class DirectiveBlock extends Block
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @var string|array|null
|
||||
* @var array|Number|null
|
||||
*/
|
||||
public $value;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
namespace ScssPhp\ScssPhp\Block;
|
||||
|
||||
use ScssPhp\ScssPhp\Block;
|
||||
use ScssPhp\ScssPhp\Node\Number;
|
||||
use ScssPhp\ScssPhp\Type;
|
||||
|
||||
/**
|
||||
@@ -26,7 +27,7 @@ class EachBlock extends Block
|
||||
public $vars = [];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @var array|Number
|
||||
*/
|
||||
public $list;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
namespace ScssPhp\ScssPhp\Block;
|
||||
|
||||
use ScssPhp\ScssPhp\Block;
|
||||
use ScssPhp\ScssPhp\Node\Number;
|
||||
use ScssPhp\ScssPhp\Type;
|
||||
|
||||
/**
|
||||
@@ -21,7 +22,7 @@ use ScssPhp\ScssPhp\Type;
|
||||
class ElseifBlock extends Block
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
* @var array|Number
|
||||
*/
|
||||
public $cond;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
namespace ScssPhp\ScssPhp\Block;
|
||||
|
||||
use ScssPhp\ScssPhp\Block;
|
||||
use ScssPhp\ScssPhp\Node\Number;
|
||||
use ScssPhp\ScssPhp\Type;
|
||||
|
||||
/**
|
||||
@@ -26,12 +27,12 @@ class ForBlock extends Block
|
||||
public $var;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @var array|Number
|
||||
*/
|
||||
public $start;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @var array|Number
|
||||
*/
|
||||
public $end;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
namespace ScssPhp\ScssPhp\Block;
|
||||
|
||||
use ScssPhp\ScssPhp\Block;
|
||||
use ScssPhp\ScssPhp\Node\Number;
|
||||
use ScssPhp\ScssPhp\Type;
|
||||
|
||||
/**
|
||||
@@ -21,7 +22,7 @@ use ScssPhp\ScssPhp\Type;
|
||||
class IfBlock extends Block
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
* @var array|Number
|
||||
*/
|
||||
public $cond;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
namespace ScssPhp\ScssPhp\Block;
|
||||
|
||||
use ScssPhp\ScssPhp\Block;
|
||||
use ScssPhp\ScssPhp\Node\Number;
|
||||
use ScssPhp\ScssPhp\Type;
|
||||
|
||||
/**
|
||||
@@ -21,7 +22,7 @@ use ScssPhp\ScssPhp\Type;
|
||||
class MediaBlock extends Block
|
||||
{
|
||||
/**
|
||||
* @var string|array|null
|
||||
* @var string|array|Number|null
|
||||
*/
|
||||
public $value;
|
||||
|
||||
|
||||
@@ -140,13 +140,28 @@ class Compiler
|
||||
/** @deprecated */
|
||||
public static $Infinity = [Type::T_KEYWORD, 'Infinity'];
|
||||
public static $null = [Type::T_NULL];
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public static $nullString = [Type::T_STRING, '', []];
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public static $defaultValue = [Type::T_KEYWORD, ''];
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public static $selfSelector = [Type::T_SELF];
|
||||
public static $emptyList = [Type::T_LIST, '', []];
|
||||
public static $emptyMap = [Type::T_MAP, [], []];
|
||||
public static $emptyString = [Type::T_STRING, '"', []];
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public static $with = [Type::T_KEYWORD, 'with'];
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public static $without = [Type::T_KEYWORD, 'without'];
|
||||
private static $emptyArgumentList = [Type::T_LIST, '', [], []];
|
||||
|
||||
@@ -1656,6 +1671,7 @@ class Compiler
|
||||
$parser = $this->parserFactory(__METHOD__);
|
||||
|
||||
if ($parser->parseValue($buffer, $reParsedWith)) {
|
||||
\assert(\is_array($reParsedWith));
|
||||
$withCondition = $reParsedWith;
|
||||
}
|
||||
}
|
||||
@@ -5702,9 +5718,35 @@ EOL;
|
||||
@trigger_error('Omitting the argument declaration when registering custom function is deprecated and won\'t be supported in ScssPhp 2.0 anymore.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
if ($this->reflectCallable($callback)->getNumberOfRequiredParameters() > 1) {
|
||||
@trigger_error('The second argument passed to the callback of custom functions is deprecated and won\'t be supported in ScssPhp 2.0 anymore. Register a callback accepting only 1 parameter instead.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$this->userFunctions[$this->normalizeName($name)] = [$callback, $argumentDeclaration];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \ReflectionFunctionAbstract
|
||||
*/
|
||||
private function reflectCallable(callable $c)
|
||||
{
|
||||
if (\is_object($c) && !$c instanceof \Closure) {
|
||||
$c = [$c, '__invoke'];
|
||||
}
|
||||
|
||||
if (\is_string($c) && false !== strpos($c, '::')) {
|
||||
$c = explode('::', $c, 2);
|
||||
}
|
||||
|
||||
if (\is_array($c)) {
|
||||
return new \ReflectionMethod($c[0], $c[1]);
|
||||
}
|
||||
|
||||
\assert(\is_string($c) || $c instanceof \Closure);
|
||||
|
||||
return new \ReflectionFunction($c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregister function
|
||||
*
|
||||
|
||||
@@ -310,8 +310,9 @@ class Parser
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @param string $buffer
|
||||
* @param string|array $out
|
||||
* @param string $buffer
|
||||
* @param mixed $out
|
||||
* @param-out array|Number $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -345,9 +346,9 @@ class Parser
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @param string $buffer
|
||||
* @param string|array $out
|
||||
* @param bool $shouldValidate
|
||||
* @param string $buffer
|
||||
* @param array $out
|
||||
* @param bool $shouldValidate
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -1255,10 +1256,10 @@ class Parser
|
||||
/**
|
||||
* Assert a parsed part is plain CSS Valid
|
||||
*
|
||||
* @param array|false $parsed
|
||||
* @param array|Number|false $parsed
|
||||
* @param int $startPos
|
||||
*
|
||||
* @return array
|
||||
* @return array|Number
|
||||
*
|
||||
* @throws ParserException
|
||||
*/
|
||||
@@ -1288,10 +1289,10 @@ class Parser
|
||||
/**
|
||||
* Check a parsed element is plain CSS Valid
|
||||
*
|
||||
* @param array $parsed
|
||||
* @param array|Number|string $parsed
|
||||
* @param bool $allowExpression
|
||||
*
|
||||
* @return array|false
|
||||
* @return ($parsed is string ? string : ($parsed is Number ? Number : array|false))
|
||||
*/
|
||||
protected function isPlainCssValidElement($parsed, $allowExpression = false)
|
||||
{
|
||||
@@ -1300,6 +1301,10 @@ class Parser
|
||||
return $parsed;
|
||||
}
|
||||
|
||||
if ($parsed instanceof Number) {
|
||||
return $parsed;
|
||||
}
|
||||
|
||||
if (
|
||||
\in_array($parsed[0], [Type::T_FUNCTION, Type::T_FUNCTION_CALL]) &&
|
||||
!\in_array($parsed[1], [
|
||||
@@ -2094,8 +2099,9 @@ class Parser
|
||||
/**
|
||||
* Parse directive value list that considers $vars as keyword
|
||||
*
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param string|false $endChar
|
||||
* @param-out array|Number $out
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
@@ -2158,7 +2164,8 @@ class Parser
|
||||
/**
|
||||
* Parse comma separated value list
|
||||
*
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param-out array|Number $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -2176,10 +2183,11 @@ class Parser
|
||||
* Parse a function call, where externals () are part of the call
|
||||
* and not of the value list
|
||||
*
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param bool $mandatoryEnclos
|
||||
* @param null|string $charAfter
|
||||
* @param null|bool $eatWhiteSp
|
||||
* @param-out array|Number $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -2215,7 +2223,8 @@ class Parser
|
||||
/**
|
||||
* Parse space separated value list
|
||||
*
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param-out array|Number $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -2227,10 +2236,11 @@ class Parser
|
||||
/**
|
||||
* Parse generic list
|
||||
*
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param string $parseItem The name of the method used to parse items
|
||||
* @param string $delim
|
||||
* @param bool $flatten
|
||||
* @param-out ($flatten is false ? array : array|Number) $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -2334,9 +2344,10 @@ class Parser
|
||||
/**
|
||||
* Parse expression
|
||||
*
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param bool $listOnly
|
||||
* @param bool $lookForExp
|
||||
* @param-out array|Number $out
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
@@ -2401,10 +2412,11 @@ class Parser
|
||||
/**
|
||||
* Parse expression specifically checking for lists in parenthesis or brackets
|
||||
*
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param int $s
|
||||
* @param string $closingParen
|
||||
* @param string[] $allowedTypes
|
||||
* @param-out array|Number $out
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
@@ -2463,10 +2475,10 @@ class Parser
|
||||
/**
|
||||
* Parse left-hand side of subexpression
|
||||
*
|
||||
* @param array $lhs
|
||||
* @param int $minP
|
||||
* @param array|Number $lhs
|
||||
* @param int $minP
|
||||
*
|
||||
* @return array
|
||||
* @return array|Number
|
||||
*/
|
||||
protected function expHelper($lhs, $minP)
|
||||
{
|
||||
@@ -2517,7 +2529,8 @@ class Parser
|
||||
/**
|
||||
* Parse value
|
||||
*
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param-out array|Number $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -2725,7 +2738,8 @@ class Parser
|
||||
/**
|
||||
* Parse parenthesized value
|
||||
*
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param-out array|Number $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -2797,7 +2811,8 @@ class Parser
|
||||
* Parse function call
|
||||
*
|
||||
* @param string $name
|
||||
* @param array $func
|
||||
* @param mixed $func
|
||||
* @param-out array $func
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -2900,7 +2915,8 @@ class Parser
|
||||
/**
|
||||
* Parse mixin/function definition argument list
|
||||
*
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param-out list<array{string, array|Number|null, bool}> $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -2962,7 +2978,8 @@ class Parser
|
||||
/**
|
||||
* Parse map
|
||||
*
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param-out array $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -3004,7 +3021,8 @@ class Parser
|
||||
/**
|
||||
* Parse color
|
||||
*
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param-out array $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -3030,7 +3048,8 @@ class Parser
|
||||
/**
|
||||
* Parse number with unit
|
||||
*
|
||||
* @param array $unit
|
||||
* @param mixed $unit
|
||||
* @param-out Number $unit
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -3236,11 +3255,12 @@ class Parser
|
||||
* Parse an unbounded string stopped by $end
|
||||
*
|
||||
* @param string $end
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param string $nestOpen
|
||||
* @param string $nestClose
|
||||
* @param bool $rtrim
|
||||
* @param string $disallow
|
||||
* @param-out array $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -3317,8 +3337,9 @@ class Parser
|
||||
/**
|
||||
* Parser interpolation
|
||||
*
|
||||
* @param string|array $out
|
||||
* @param bool $lookWhite save information about whitespace before and after
|
||||
* @param mixed $out
|
||||
* @param bool $lookWhite save information about whitespace before and after
|
||||
* @param-out array $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -3852,7 +3873,8 @@ class Parser
|
||||
/**
|
||||
* Parse a variable
|
||||
*
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param-out array{Type::*, string} $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -3881,9 +3903,10 @@ class Parser
|
||||
/**
|
||||
* Parse a keyword
|
||||
*
|
||||
* @param string $word
|
||||
* @param bool $eatWhitespace
|
||||
* @param bool $inSelector
|
||||
* @param mixed $word
|
||||
* @param bool $eatWhitespace
|
||||
* @param bool $inSelector
|
||||
* @param-out string $word
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -3999,7 +4022,8 @@ class Parser
|
||||
/**
|
||||
* Parse a url
|
||||
*
|
||||
* @param array $out
|
||||
* @param mixed $out
|
||||
* @param-out array $out
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -4009,10 +4033,10 @@ class Parser
|
||||
$s = $this->count;
|
||||
|
||||
if (
|
||||
($this->string($out) || $this->spaceList($out)) &&
|
||||
($this->string($inner) || $this->spaceList($inner)) &&
|
||||
$this->matchChar(')')
|
||||
) {
|
||||
$out = [Type::T_STRING, '', ['url(', $out, ')']];
|
||||
$out = [Type::T_STRING, '', ['url(', $inner, ')']];
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -4055,7 +4079,7 @@ class Parser
|
||||
/**
|
||||
* Strip assignment flag from the list
|
||||
*
|
||||
* @param array $value
|
||||
* @param array|Number $value
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
|
||||
@@ -95,6 +95,9 @@ class Type
|
||||
* @internal
|
||||
*/
|
||||
const T_FOR = 'for';
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
const T_FUNCTION = 'function';
|
||||
/**
|
||||
* @internal
|
||||
|
||||
@@ -19,5 +19,5 @@ namespace ScssPhp\ScssPhp;
|
||||
*/
|
||||
class Version
|
||||
{
|
||||
const VERSION = '1.12.1';
|
||||
const VERSION = '1.13.0';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user