| Conditions | 2 |
| Paths | 2 |
| Total Lines | 7 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | public static function fromArrayDefinition(string $operator, array $operands): self |
||
| 45 | { |
||
| 46 | if (!isset($operands[0], $operands[1])) { |
||
| 47 | throw new InvalidArgumentException("Operator '$operator' requires two operands."); |
||
| 48 | } |
||
| 49 | |||
| 50 | return new self($operands[0], $operator, $operands[1]); |
||
| 51 | } |
||
| 53 |