mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
Update more code.
This commit is contained in:
@@ -30,13 +30,8 @@ namespace FireflyIII\Support\Search\QueryParser;
|
||||
*/
|
||||
class FieldNode extends Node
|
||||
{
|
||||
private string $operator;
|
||||
private string $value;
|
||||
|
||||
public function __construct(string $operator, string $value, bool $prohibited = false)
|
||||
public function __construct(private readonly string $operator, private readonly string $value, bool $prohibited = false)
|
||||
{
|
||||
$this->operator = $operator;
|
||||
$this->value = $value;
|
||||
$this->prohibited = $prohibited;
|
||||
}
|
||||
|
||||
|
@@ -33,7 +33,7 @@ use Illuminate\Support\Facades\Log;
|
||||
|
||||
class GdbotsQueryParser implements QueryParserInterface
|
||||
{
|
||||
private BaseQueryParser $parser;
|
||||
private readonly BaseQueryParser $parser;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -98,7 +98,7 @@ class GdbotsQueryParser implements QueryParserInterface
|
||||
|
||||
default:
|
||||
throw new FireflyException(
|
||||
sprintf('Unsupported node type: %s', get_class($node))
|
||||
sprintf('Unsupported node type: %s', $node::class)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -32,15 +32,11 @@ namespace FireflyIII\Support\Search\QueryParser;
|
||||
*/
|
||||
class NodeGroup extends Node
|
||||
{
|
||||
/** @var Node[] */
|
||||
private array $nodes;
|
||||
|
||||
/**
|
||||
* @param Node[] $nodes
|
||||
*/
|
||||
public function __construct(array $nodes, bool $prohibited = false)
|
||||
public function __construct(private readonly array $nodes, bool $prohibited = false)
|
||||
{
|
||||
$this->nodes = $nodes;
|
||||
$this->prohibited = $prohibited;
|
||||
}
|
||||
|
||||
|
@@ -30,11 +30,8 @@ namespace FireflyIII\Support\Search\QueryParser;
|
||||
*/
|
||||
class StringNode extends Node
|
||||
{
|
||||
private string $value;
|
||||
|
||||
public function __construct(string $value, bool $prohibited = false)
|
||||
public function __construct(private readonly string $value, bool $prohibited = false)
|
||||
{
|
||||
$this->value = $value;
|
||||
$this->prohibited = $prohibited;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user