| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 55 | protected function execute() |
||
| 56 | { |
||
| 57 | switch($this->type) { |
||
| 58 | case self::TYPE_FIND: |
||
| 59 | return $this->collection->find($this->filters, $this->options); |
||
| 60 | break; |
||
|
|
|||
| 61 | case self::TYPE_COUNT: |
||
| 62 | return $this->collection->count($this->filters, $this->options); |
||
| 63 | break; |
||
| 64 | default: |
||
| 65 | throw new \Exception('Unsupported query type ... I\'m sorry'); |
||
| 66 | } |
||
| 67 | } |
||
| 68 | |||
| 85 |
The break statement is not necessary if it is preceded for example by a return statement:
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.