Completed
Push — master ( db1c89...2f2a87 )
by Alessandro
01:36
created
src/Query.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     }
47 47
 
48 48
     /**
49
-     * @return mixed
49
+     * @return \MongoDB\Driver\Cursor|null
50 50
      *
51 51
      * @throws \Exception
52 52
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.