Simplify further

This commit is contained in:
Sobuno
2025-01-02 23:36:00 +01:00
parent af7a4b5d3d
commit a62916a63d
5 changed files with 87 additions and 188 deletions

View File

@@ -28,9 +28,4 @@ class FieldNode extends Node
{
return $this->value;
}
public function __toString(): string
{
return ($this->prohibited ? '-' : '') . $this->operator . ':' . $this->value;
}
}

View File

@@ -9,8 +9,6 @@ namespace FireflyIII\Support\Search\QueryParser;
*/
abstract class Node
{
abstract public function __toString(): string;
protected bool $prohibited;
public function isProhibited(): bool

View File

@@ -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)) . ']';
}
}

View File

@@ -21,9 +21,4 @@ class StringNode extends Node
{
return $this->value;
}
public function __toString(): string
{
return ($this->prohibited ? '-' : '') . $this->value;
}
}