| 1 | <?php declare(strict_types = 1); |
||
| 11 | class Query |
||
| 12 | { |
||
| 13 | const TYPE_FIND = 1; |
||
| 14 | const TYPE_COUNT = 2; |
||
| 15 | const TYPE_AGGREGATE = 3; |
||
| 16 | |||
| 17 | /** @var Collection */ |
||
| 18 | private $collection; |
||
| 19 | /** @var array */ |
||
| 20 | private $querySettings; |
||
| 21 | /** @var array */ |
||
| 22 | private $options; |
||
| 23 | /** @var int */ |
||
| 24 | private $type; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Query constructor. |
||
| 28 | * |
||
| 29 | * @param Collection $collection |
||
| 30 | * @param int $type |
||
| 31 | * @param array $querySettings |
||
| 32 | * @param array $options |
||
| 33 | */ |
||
| 34 | 20 | public function __construct( |
|
| 45 | |||
| 46 | /** |
||
| 47 | * @return mixed|Cursor |
||
| 48 | * |
||
| 49 | * @throws \Exception |
||
| 50 | */ |
||
| 51 | 9 | public function execute() |
|
| 67 | |||
| 68 | /** |
||
| 69 | * @return array |
||
| 70 | */ |
||
| 71 | 9 | public function getQuerySettings(): array |
|
| 75 | |||
| 76 | /** |
||
| 77 | * @return array |
||
| 78 | */ |
||
| 79 | 8 | public function getOptions(): array |
|
| 83 | } |
||
| 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.