Conditions | 4 |
Paths | 5 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function apply(DataSourceInterface $dataSource, $name, $data, array $options) |
||
29 | { |
||
30 | if (null === $data) { |
||
31 | return; |
||
32 | } |
||
33 | |||
34 | $field = isset($options['field']) ? $options['field'] : $name; |
||
35 | |||
36 | if (self::TRUE === (bool) $data) { |
||
37 | $dataSource->restrict($dataSource->getExpressionBuilder()->isNotNull($field)); |
||
38 | |||
39 | return; |
||
40 | } |
||
41 | |||
42 | $dataSource->restrict($dataSource->getExpressionBuilder()->isNull($field)); |
||
43 | } |
||
44 | } |
||
45 |