Completed
Push — master ( 466592...76e429 )
by Jacob
02:37
created
src/Query.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      * @param   int             $limit      The number of Models to limit.
84 84
      * @return  \Doctrine\MongoDB\Cursor
85 85
      */
86
-    public function executeFind(EntityMetadata $metadata, Store $store, array $criteria, array $fields = [], array $sort = [], $offset = 0, $limit = 0)
86
+    public function executeFind(EntityMetadata $metadata, Store $store, array $criteria, array $fields = [ ], array $sort = [ ], $offset = 0, $limit = 0)
87 87
     {
88 88
         $criteria = $this->getFormatter()->formatQuery($metadata, $store, $criteria);
89 89
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         ];
163 163
         if (true === $related->isChildEntity()) {
164 164
             // The relationship is owned by a polymorphic model. Must include the type in the root criteria.
165
-            $criteria[Persister::POLYMORPHIC_KEY] = $related->type;
165
+            $criteria[ Persister::POLYMORPHIC_KEY ] = $related->type;
166 166
         }
167 167
         return $criteria;
168 168
     }
@@ -190,16 +190,16 @@  discard block
 block discarded – undo
190 190
      */
191 191
     public function getRetrieveCritiera(EntityMetadata $metadata, $identifiers = null)
192 192
     {
193
-        $criteria = [];
193
+        $criteria = [ ];
194 194
         if (true === $metadata->isChildEntity()) {
195
-            $criteria[Persister::POLYMORPHIC_KEY] = $metadata->type;
195
+            $criteria[ Persister::POLYMORPHIC_KEY ] = $metadata->type;
196 196
         }
197 197
 
198 198
         $identifiers = (array) $identifiers;
199 199
         if (empty($identifiers)) {
200 200
             return $criteria;
201 201
         }
202
-        $criteria[Persister::IDENTIFIER_KEY] = (1 === count($identifiers)) ? reset($identifiers) : $identifiers;
202
+        $criteria[ Persister::IDENTIFIER_KEY ] = (1 === count($identifiers)) ? reset($identifiers) : $identifiers;
203 203
         return $criteria;
204 204
     }
205 205
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
      */
284 284
     private function isSearchQuery(array $criteria)
285 285
     {
286
-        if (isset($criteria['$text'])) {
286
+        if (isset($criteria[ '$text' ])) {
287 287
             return true;
288 288
         }
289 289
         foreach ($criteria as $key => $value) {
@@ -312,8 +312,8 @@  discard block
 block discarded – undo
312 312
             if ($type !== $include) {
313 313
                 PersisterException::badRequest('Field projection mismatch. You cannot both exclude and include fields.');
314 314
             }
315
-            $fields[$key] = $type;
315
+            $fields[ $key ] = $type;
316 316
         }
317
-        return [$fields, $include];
317
+        return [ $fields, $include ];
318 318
     }
319 319
 }
Please login to merge, or discard this patch.