| Conditions | 4 | 
| Paths | 4 | 
| Total Lines | 16 | 
| Code Lines | 13 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 9 | 
| CRAP Score | 4 | 
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1);  | 
            ||
| 51 | 9 | public function execute()  | 
            |
| 52 |     { | 
            ||
| 53 | 9 |         switch($this->type) { | 
            |
| 54 | 9 | case self::TYPE_FIND:  | 
            |
| 55 | 6 | return $this->collection->find($this->querySettings, $this->options);  | 
            |
| 56 | break;  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 57 | 3 | case self::TYPE_COUNT:  | 
            |
| 58 | 1 | return $this->collection->count($this->querySettings, $this->options);  | 
            |
| 59 | break;  | 
            ||
| 60 | 2 | case self::TYPE_AGGREGATE:  | 
            |
| 61 | 1 | return $this->collection->aggregate($this->querySettings, $this->options);  | 
            |
| 62 | break;  | 
            ||
| 63 | default:  | 
            ||
| 64 | 1 |                 throw new \Exception('Unsupported query type ... I\'m sorry'); | 
            |
| 65 | }  | 
            ||
| 66 | }  | 
            ||
| 67 | |||
| 84 | 
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.