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