mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Import statements and update configuration.
This commit is contained in:
@@ -48,6 +48,8 @@ use FireflyIII\Support\Search\QueryParser\StringNode;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Collection;
|
||||
use LogicException;
|
||||
use TypeError;
|
||||
|
||||
/**
|
||||
* Class OperatorQuerySearch
|
||||
@@ -143,7 +145,7 @@ class OperatorQuerySearch implements SearchInterface
|
||||
|
||||
try {
|
||||
$parsedQuery = $parser->parse($query);
|
||||
} catch (\LogicException|\TypeError $e) {
|
||||
} catch (LogicException|TypeError $e) {
|
||||
app('log')->error($e->getMessage());
|
||||
app('log')->error(sprintf('Could not parse search: "%s".', $query));
|
||||
|
||||
|
@@ -30,6 +30,8 @@ use Gdbots\QueryParser\Enum\BoolOperator;
|
||||
use Gdbots\QueryParser\Node as GdbotsNode;
|
||||
use Gdbots\QueryParser\QueryParser as BaseQueryParser;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use LogicException;
|
||||
use TypeError;
|
||||
|
||||
class GdbotsQueryParser implements QueryParserInterface
|
||||
{
|
||||
@@ -53,7 +55,7 @@ class GdbotsQueryParser implements QueryParserInterface
|
||||
);
|
||||
|
||||
return new NodeGroup($nodes);
|
||||
} catch (\LogicException|\TypeError $e) {
|
||||
} catch (LogicException|TypeError $e) {
|
||||
\Safe\fwrite(STDERR, "Setting up GdbotsQueryParserTest\n");
|
||||
app('log')->error($e->getMessage());
|
||||
app('log')->error(sprintf('Could not parse search: "%s".', $query));
|
||||
|
@@ -25,11 +25,14 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Support\Search\QueryParser;
|
||||
|
||||
use LogicException;
|
||||
use TypeError;
|
||||
|
||||
interface QueryParserInterface
|
||||
{
|
||||
/**
|
||||
* @throws \LogicException
|
||||
* @throws \TypeError
|
||||
* @throws LogicException
|
||||
* @throws TypeError
|
||||
*/
|
||||
public function parse(string $query): NodeGroup;
|
||||
}
|
||||
|
Reference in New Issue
Block a user