Fix copyright for new files.

This commit is contained in:
James Cole 2025-01-05 07:40:30 +01:00
parent 0810f617c7
commit fd6560bdd0
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
9 changed files with 158 additions and 9 deletions

View File

@ -326,7 +326,7 @@ USE_RUNNING_BALANCE=false
FIREFLY_III_LAYOUT=v1
#
# Which Query Parser implementation to use for the Search Engine and Rules
# Which Query Parser implementation to use for the search rngine and rules
# 'new' is experimental, 'legacy' is the classic one
#
QUERY_PARSER_IMPLEMENTATION=legacy

View File

@ -174,7 +174,7 @@ class OperatorQuerySearch implements SearchInterface
*
* @SuppressWarnings("PHPMD.CyclomaticComplexity")
*/
private function handleSearchNode(Node $node, $flipProhibitedFlag): void
private function handleSearchNode(Node $node, bool $flipProhibitedFlag): void
{
app('log')->debug(sprintf('Now in handleSearchNode(%s)', get_class($node)));
@ -197,7 +197,7 @@ class OperatorQuerySearch implements SearchInterface
}
}
private function handleNodeGroup(NodeGroup $node, $flipProhibitedFlag): void
private function handleNodeGroup(NodeGroup $node, bool $flipProhibitedFlag): void
{
$prohibited = $node->isProhibited($flipProhibitedFlag);
@ -208,9 +208,9 @@ class OperatorQuerySearch implements SearchInterface
private function handleStringNode(StringNode $node, $flipProhibitedFlag): void
private function handleStringNode(StringNode $node, bool $flipProhibitedFlag): void
{
$string = (string) $node->getValue();
$string = $node->getValue();
$prohibited = $node->isProhibited($flipProhibitedFlag);
@ -226,7 +226,7 @@ class OperatorQuerySearch implements SearchInterface
/**
* @throws FireflyException
*/
private function handleFieldNode(FieldNode $node, $flipProhibitedFlag): void
private function handleFieldNode(FieldNode $node, bool $flipProhibitedFlag): void
{
$operator = strtolower($node->getOperator());
$value = $node->getValue();
@ -247,10 +247,10 @@ class OperatorQuerySearch implements SearchInterface
// must be valid operator:
if (in_array($operator, $this->validOperators, true)) {
if ($this->updateCollector($operator, (string)$value, $prohibited)) {
if ($this->updateCollector($operator, $value, $prohibited)) {
$this->operators->push([
'type' => self::getRootOperator($operator),
'value' => (string)$value,
'value' => $value,
'prohibited' => $prohibited,
]);
app('log')->debug(sprintf('Added operator type "%s"', $operator));
@ -259,7 +259,7 @@ class OperatorQuerySearch implements SearchInterface
app('log')->debug(sprintf('Added INVALID operator type "%s"', $operator));
$this->invalidOperators[] = [
'type' => $operator,
'value' => (string)$value,
'value' => $value,
];
}
}

View File

@ -1,5 +1,26 @@
<?php
/*
* FieldNode.php
* Copyright (c) 2025 https://github.com/Sobuno
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
declare(strict_types=1);
namespace FireflyIII\Support\Search\QueryParser;

View File

@ -1,5 +1,26 @@
<?php
/*
* GdbotsQueryParser.php
* Copyright (c) 2025 https://github.com/Sobuno
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
declare(strict_types=1);
namespace FireflyIII\Support\Search\QueryParser;

View File

@ -1,5 +1,26 @@
<?php
/*
* Node.php
* Copyright (c) 2025 https://github.com/Sobuno
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
declare(strict_types=1);
namespace FireflyIII\Support\Search\QueryParser;

View File

@ -1,5 +1,26 @@
<?php
/*
* NodeGroup.php
* Copyright (c) 2025 https://github.com/Sobuno
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
declare(strict_types=1);
namespace FireflyIII\Support\Search\QueryParser;

View File

@ -1,5 +1,26 @@
<?php
/*
* QueryParser.php
* Copyright (c) 2025 https://github.com/Sobuno
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
declare(strict_types=1);
namespace FireflyIII\Support\Search\QueryParser;

View File

@ -1,5 +1,26 @@
<?php
/*
* QueryParserInterface.php
* Copyright (c) 2025 https://github.com/Sobuno
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
declare(strict_types=1);
namespace FireflyIII\Support\Search\QueryParser;
@ -8,6 +29,8 @@ interface QueryParserInterface
{
/**
* @return NodeGroup
* @throws \LogicException
* @throws \TypeError
*/
public function parse(string $query): NodeGroup;
}

View File

@ -1,5 +1,26 @@
<?php
/*
* StringNode.php
* Copyright (c) 2025 https://github.com/Sobuno
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
declare(strict_types=1);
namespace FireflyIII\Support\Search\QueryParser;