@@ -46,7 +46,7 @@ |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
49 | - * @return mixed |
|
49 | + * @return \MongoDB\Driver\Cursor|null |
|
50 | 50 | * |
51 | 51 | * @throws \Exception |
52 | 52 | */ |
@@ -37,12 +37,12 @@ discard block |
||
37 | 37 | * @param array $query |
38 | 38 | * @param array $options |
39 | 39 | */ |
40 | - public function __construct(Collection $collection, array $query = [], array $options = []) |
|
40 | + public function __construct(Collection $collection, array $query = [ ], array $options = [ ]) |
|
41 | 41 | { |
42 | 42 | $this->collection = $collection; |
43 | 43 | $this->query = $query; |
44 | 44 | $this->options = $options; |
45 | - $this->type = $query['type'] ?? self::TYPE_FIND; |
|
45 | + $this->type = $query[ 'type' ] ?? self::TYPE_FIND; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function execute() |
54 | 54 | { |
55 | - switch($this->type) { |
|
55 | + switch ($this->type) { |
|
56 | 56 | case self::TYPE_FIND: |
57 | 57 | return $this->collection->find($this->query, $this->options); |
58 | 58 | break; |