🤖 Auto commit for release 'develop' on 2025-09-26

This commit is contained in:
JC5
2025-09-26 19:43:39 +02:00
parent 853a99852e
commit d3c557ca22
103 changed files with 1411 additions and 1336 deletions

View File

@@ -32,6 +32,7 @@ use Gdbots\QueryParser\QueryParser as BaseQueryParser;
use Illuminate\Support\Facades\Log;
use LogicException;
use TypeError;
use function Safe\fwrite;
class GdbotsQueryParser implements QueryParserInterface
@@ -51,12 +52,12 @@ class GdbotsQueryParser implements QueryParserInterface
try {
$result = $this->parser->parse($query);
$nodes = array_map(
fn(GdbotsNode\Node $node) => $this->convertNode($node),
fn (GdbotsNode\Node $node) => $this->convertNode($node),
$result->getNodes()
);
return new NodeGroup($nodes);
} catch (LogicException | TypeError $e) {
} catch (LogicException|TypeError $e) {
fwrite(STDERR, "Setting up GdbotsQueryParserTest\n");
app('log')->error($e->getMessage());
app('log')->error(sprintf('Could not parse search: "%s".', $query));
@@ -84,7 +85,7 @@ class GdbotsQueryParser implements QueryParserInterface
return new NodeGroup(
array_map(
fn(GdbotsNode\Node $subNode) => $this->convertNode($subNode),
fn (GdbotsNode\Node $subNode) => $this->convertNode($subNode),
$node->getNodes()
)
);

View File

@@ -139,7 +139,7 @@ class QueryParser implements QueryParserInterface
if ('' === $tokenUnderConstruction) {
// In any other location, it's just a normal character
$tokenUnderConstruction .= $char;
$skipNext = true;
$skipNext = true;
}
if ('' !== $tokenUnderConstruction && !$skipNext) { // @phpstan-ignore-line
Log::debug(sprintf('Turns out that "%s" is a field name. Reset the token.', $tokenUnderConstruction));
@@ -171,7 +171,7 @@ class QueryParser implements QueryParserInterface
++$this->position;
}
$finalNode = '' !== $tokenUnderConstruction || '' !== $fieldName
$finalNode = '' !== $tokenUnderConstruction || '' !== $fieldName
? $this->createNode($tokenUnderConstruction, $fieldName, $prohibited)
: null;
@@ -184,7 +184,7 @@ class QueryParser implements QueryParserInterface
$nodeResult = $this->buildNextNode($isSubquery);
while ($nodeResult->node instanceof Node) {
$nodes[] = $nodeResult->node;
$nodes[] = $nodeResult->node;
if ($nodeResult->isSubqueryEnd) {
break;
}