| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | public function visitOperator(AST\Operator $element, &$handle = null, $eldnah = null) |
||
| 35 | { |
||
| 36 | $parameters = []; |
||
| 37 | $operator = $element->getName(); |
||
| 38 | $sql = parent::visitOperator($element, $parameters, $eldnah); |
||
| 39 | |||
| 40 | if (in_array($operator, ['and', 'or', 'not'], true)) { |
||
| 41 | return $sql; |
||
| 42 | } |
||
| 43 | |||
| 44 | if ($this->operators->hasOperator($operator)) { |
||
| 45 | return sprintf('(new \PommProject\Foundation\Where(%s, [%s]))', $sql, implode(', ', $parameters)); |
||
| 46 | } |
||
| 47 | |||
| 48 | return sprintf('(new \PommProject\Foundation\Where("%s", [%s]))', $sql, implode(', ', $parameters)); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |