| Total Complexity | 6 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | final class SimpleCondition implements SimpleConditionInterface |
||
| 20 | { |
||
| 21 | public function __construct( |
||
| 22 | private string|Expression|QueryInterface $column, |
||
| 23 | private string $operator, |
||
| 24 | private array|int|string|Iterator|ExpressionInterface|null $value |
||
| 25 | ) { |
||
| 26 | } |
||
| 27 | |||
| 28 | public function getColumn(): string|Expression|QueryInterface |
||
| 29 | { |
||
| 30 | return $this->column; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getOperator(): string |
||
| 34 | { |
||
| 35 | return $this->operator; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function getValue(): array|int|string|Iterator|ExpressionInterface|null |
||
| 39 | { |
||
| 40 | return $this->value; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @throws InvalidArgumentException |
||
| 45 | * |
||
| 46 | * @psalm-suppress MixedArgument |
||
| 47 | */ |
||
| 48 | public static function fromArrayDefinition(string $operator, array $operands): self |
||
| 55 | } |
||
| 56 | } |
||
| 57 |