提交的内容

This commit is contained in:
2025-05-12 15:45:02 +08:00
parent 629c4750da
commit b48c692775
3043 changed files with 34732 additions and 60810 deletions

4
vendor/mtdowling/jmespath.php/src/AstRuntime.php vendored Executable file → Normal file
View File

@ -12,8 +12,8 @@ class AstRuntime
private $cachedCount = 0;
public function __construct(
Parser $parser = null,
callable $fnDispatcher = null
?Parser $parser = null,
?callable $fnDispatcher = null
) {
$fnDispatcher = $fnDispatcher ?: FnDispatcher::getInstance();
$this->interpreter = new TreeInterpreter($fnDispatcher);

2
vendor/mtdowling/jmespath.php/src/CompilerRuntime.php vendored Executable file → Normal file
View File

@ -23,7 +23,7 @@ class CompilerRuntime
* @param Parser|null $parser JMESPath parser to utilize
* @throws \RuntimeException if the cache directory cannot be created
*/
public function __construct($dir = null, Parser $parser = null)
public function __construct($dir = null, ?Parser $parser = null)
{
$this->parser = $parser ?: new Parser();
$this->compiler = new TreeCompiler();

0
vendor/mtdowling/jmespath.php/src/DebugRuntime.php vendored Executable file → Normal file
View File

0
vendor/mtdowling/jmespath.php/src/Env.php vendored Executable file → Normal file
View File

0
vendor/mtdowling/jmespath.php/src/FnDispatcher.php vendored Executable file → Normal file
View File

0
vendor/mtdowling/jmespath.php/src/JmesPath.php vendored Executable file → Normal file
View File

0
vendor/mtdowling/jmespath.php/src/Lexer.php vendored Executable file → Normal file
View File

8
vendor/mtdowling/jmespath.php/src/Parser.php vendored Executable file → Normal file
View File

@ -57,7 +57,7 @@ class Parser
/**
* @param Lexer|null $lexer Lexer used to tokenize expressions
*/
public function __construct(Lexer $lexer = null)
public function __construct(?Lexer $lexer = null)
{
$this->lexer = $lexer ?: new Lexer();
}
@ -366,7 +366,7 @@ class Parser
];
}
private function parseWildcardObject(array $left = null)
private function parseWildcardObject(?array $left = null)
{
$this->next();
@ -380,7 +380,7 @@ class Parser
];
}
private function parseWildcardArray(array $left = null)
private function parseWildcardArray(?array $left = null)
{
static $getRbracket = [T::T_RBRACKET => true];
$this->next($getRbracket);
@ -473,7 +473,7 @@ class Parser
: $this->tokens[$this->tpos + 1]['type'];
}
private function next(array $match = null)
private function next(?array $match = null)
{
if (!isset($this->tokens[$this->tpos + 1])) {
$this->token = self::$nullToken;

2
vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php vendored Executable file → Normal file
View File

@ -16,7 +16,7 @@ class SyntaxErrorException extends \InvalidArgumentException
array $token,
$expression
) {
$message = "Syntax error at character {$token['pos']}\n"
$message = sprintf("Syntax error at character %d\n", max($token['pos'], 0))
. $expression . "\n" . str_repeat(' ', max($token['pos'], 0)) . "^\n";
$message .= !is_array($expectedTypesOrMessage)
? $expectedTypesOrMessage

2
vendor/mtdowling/jmespath.php/src/TreeCompiler.php vendored Executable file → Normal file
View File

@ -305,7 +305,7 @@ class TreeCompiler
->write('%s = [];', $merged)
->write('foreach ($value as %s) {', $val)
->indent()
->write('if (is_array(%s) && isset(%s[0])) {', $val, $val)
->write('if (is_array(%s) && array_key_exists(0, %s)) {', $val, $val)
->indent()
->write('%s = array_merge(%s, %s);', $merged, $merged, $val)
->outdent()

4
vendor/mtdowling/jmespath.php/src/TreeInterpreter.php vendored Executable file → Normal file
View File

@ -14,7 +14,7 @@ class TreeInterpreter
* a function name argument and an array of
* function arguments and returns the result.
*/
public function __construct(callable $fnDispatcher = null)
public function __construct(?callable $fnDispatcher = null)
{
$this->fnDispatcher = $fnDispatcher ?: FnDispatcher::getInstance();
}
@ -107,7 +107,7 @@ class TreeInterpreter
$merged = [];
foreach ($value as $values) {
// Only merge up arrays lists and not hashes
if (is_array($values) && isset($values[0])) {
if (is_array($values) && array_key_exists(0, $values)) {
$merged = array_merge($merged, $values);
} elseif ($values !== $skipElement) {
$merged[] = $values;

0
vendor/mtdowling/jmespath.php/src/Utils.php vendored Executable file → Normal file
View File