mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Simplify further
This commit is contained in:
@@ -28,9 +28,4 @@ class FieldNode extends Node
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return ($this->prohibited ? '-' : '') . $this->operator . ':' . $this->value;
|
||||
}
|
||||
}
|
||||
|
@@ -9,8 +9,6 @@ namespace FireflyIII\Support\Search\QueryParser;
|
||||
*/
|
||||
abstract class Node
|
||||
{
|
||||
abstract public function __toString(): string;
|
||||
|
||||
protected bool $prohibited;
|
||||
|
||||
public function isProhibited(): bool
|
||||
|
@@ -31,10 +31,4 @@ class NodeGroup extends Node
|
||||
{
|
||||
return $this->nodes;
|
||||
}
|
||||
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return ($this->prohibited ? '-' : '') . '[' . implode(' ', array_map(fn($node) => (string)$node, $this->nodes)) . ']';
|
||||
}
|
||||
}
|
||||
|
@@ -21,9 +21,4 @@ class StringNode extends Node
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
public function __toString(): string
|
||||
{
|
||||
return ($this->prohibited ? '-' : '') . $this->value;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user