| Total Complexity | 6 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | final class ExistsCondition implements ExistConditionInterface |
||
| 15 | { |
||
| 16 | public function __construct(private string $operator, private QueryInterface $query) |
||
| 18 | } |
||
| 19 | |||
| 20 | public function getOperator(): string |
||
| 21 | { |
||
| 22 | return $this->operator; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getQuery(): QueryInterface |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Creates a condition based on the given operator and operands. |
||
| 32 | * |
||
| 33 | * @throws InvalidArgumentException If the number of operands isn't 1, and the first operand isn't a query object. |
||
| 34 | */ |
||
| 35 | public static function fromArrayDefinition(string $operator, array $operands): self |
||
| 44 |