| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | public static function create(Operators\Definitions $customOperators) |
||
| 13 | { |
||
| 14 | $definitions = Operators\GenericSqlDefinitions::create($customOperators); |
||
| 15 | |||
| 16 | $definitions->defineInlineOperator('and', function ($a, $b) { |
||
| 17 | return sprintf('%s->andWhere(%s)', $a, $b); |
||
| 18 | }); |
||
| 19 | $definitions->defineInlineOperator('or', function ($a, $b) { |
||
| 20 | return sprintf('%s->orWhere(%s)', $a, $b); |
||
| 21 | }); |
||
| 22 | $definitions->defineInlineOperator('not', function ($a) { |
||
| 23 | return sprintf('(new \PommProject\Foundation\Where("NOT(".%s->getElement() .")", %s->getValues()))', $a, $a); |
||
| 24 | }); |
||
| 25 | |||
| 26 | return $definitions; |
||
| 27 | } |
||
| 28 | } |
||
| 29 |