Completed
Push — master ( 957a77...d1fc9e )
by Fran
02:04
created
src/NOSQL/Models/NOSQLQuery.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         $con = NOSQLParserTrait::initConnection($model, $con);
22 22
         $collection = $con->selectCollection($model->getSchema()->name);
23 23
         $result = $collection->findOne(['_id' => new ObjectId($pk)]);
24
-        if(null !== $result) {
24
+        if (null !== $result) {
25 25
             $model->feed($result->getArrayCopy());
26 26
         } else {
27 27
             throw new ApiException(t('Document not found'), 404);
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
         $resultSet = new ResultsetDto(false);
46 46
         $resultSet->count = $collection->countDocuments($filters);
47 47
         $nosqlOptions = [
48
-            'limit' => (integer)(array_key_exists(Api::API_LIMIT_FIELD, $criteria) ? $criteria[Api::API_LIMIT_FIELD] : Config::getParam('pagination.limit', 50)),
48
+            'limit' => (integer) (array_key_exists(Api::API_LIMIT_FIELD, $criteria) ? $criteria[Api::API_LIMIT_FIELD] : Config::getParam('pagination.limit', 50)),
49 49
         ];
50 50
         $filters = self::parseCriteria($criteria, $model);
51 51
         $results = $collection->find($filters, $nosqlOptions);
52 52
         /** @var  $result */
53 53
         $items = $results->toArray();
54
-        foreach($items as $item) {
54
+        foreach ($items as $item) {
55 55
             $model->feed($item->getArrayCopy(), true);
56 56
             $resultSet->items[] = $model->getDtoCopy(true);
57 57
         }
Please login to merge, or discard this patch.