| Conditions | 3 |
| Paths | 4 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3.0052 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | 1 | public function __construct(?string $relation, string $column, $value) |
|
| 24 | { |
||
| 25 | 1 | if (\is_string($value)) { |
|
| 26 | 1 | $value = array_filter( |
|
| 27 | 1 | $this->valueToArray('|', trim($value)) |
|
| 28 | ); |
||
| 29 | } |
||
| 30 | |||
| 31 | 1 | if (\count($value) < 2) { |
|
| 32 | throw new ExpressionException('The number of "values" must be greater than one'); |
||
| 33 | } |
||
| 34 | |||
| 35 | 1 | parent::__construct( |
|
| 36 | 1 | $relation, |
|
| 37 | 1 | $column, |
|
| 38 | 1 | $value |
|
| 39 | ); |
||
| 40 | |||
| 41 | 1 | $this->setExpression('$or'); |
|
| 42 | 1 | $this->setOperator(); |
|
| 43 | 1 | } |
|
| 45 |