| Conditions | 5 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 54 | public function addFilter(BuilderInterface $filter, $name = '') |
||
| 55 | { |
||
| 56 | if ($this->anonymous === false && empty($name)) { |
||
| 57 | throw new \LogicException('In not anonymous filters filter name must be set.'); |
||
| 58 | } elseif ($this->anonymous === false && !empty($name)) { |
||
| 59 | $this->filters['filters'][$name] = [$filter->getType() => $filter->toArray()]; |
||
| 60 | } else { |
||
| 61 | $this->filters['filters'][] = [$filter->getType() => $filter->toArray()]; |
||
| 62 | } |
||
| 63 | |||
| 64 | return $this; |
||
| 65 | } |
||
| 66 | |||
| 83 |