| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 55 | 3 | public function execute() |
|
| 56 | { |
||
| 57 | 3 | switch($this->type) { |
|
| 58 | 3 | case self::TYPE_FIND: |
|
| 59 | 1 | return $this->collection->find($this->filters, $this->options); |
|
| 60 | break; |
||
|
|
|||
| 61 | 2 | case self::TYPE_COUNT: |
|
| 62 | 1 | return $this->collection->count($this->filters, $this->options); |
|
| 63 | break; |
||
| 64 | default: |
||
| 65 | 1 | 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.