Completed
Pull Request — master (#182)
by
unknown
02:54
created
lib/Alcaeus/MongoDbAdapter/TypeConverter.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -176,8 +176,8 @@
 block discarded – undo
176 176
             case $value instanceof Model\BSONDocument:
177 177
             case $value instanceof Model\BSONArray:
178 178
 
179
-            	if($value->sec && $value->usec)
180
-            		return new \MongoDate($value->sec, $value->usec);
179
+             if($value->sec && $value->usec)
180
+              return new \MongoDate($value->sec, $value->usec);
181 181
 
182 182
                 return array_map(
183 183
                     ['self', 'toLegacy'],
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -103,16 +103,16 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public static function convertProjection($fields)
105 105
     {
106
-        if (! is_array($fields) || $fields === []) {
106
+        if ( ! is_array($fields) || $fields === []) {
107 107
             return [];
108 108
         }
109 109
 
110
-        if (! TypeConverter::isNumericArray($fields)) {
110
+        if ( ! TypeConverter::isNumericArray($fields)) {
111 111
             $projection = TypeConverter::fromLegacy($fields);
112 112
         } else {
113 113
             $projection = array_fill_keys(
114
-                array_map(function ($field) {
115
-                    if (!is_string($field)) {
114
+                array_map(function($field) {
115
+                    if ( ! is_string($field)) {
116 116
                         throw new \MongoException('field names must be strings', 8);
117 117
                     }
118 118
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             case $value instanceof Model\BSONDocument:
177 177
             case $value instanceof Model\BSONArray:
178 178
 
179
-            	if($value->sec && $value->usec)
179
+            	if ($value->sec && $value->usec)
180 180
             		return new \MongoDate($value->sec, $value->usec);
181 181
 
182 182
                 return array_map(
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -176,8 +176,9 @@
 block discarded – undo
176 176
             case $value instanceof Model\BSONDocument:
177 177
             case $value instanceof Model\BSONArray:
178 178
 
179
-            	if($value->sec && $value->usec)
180
-            		return new \MongoDate($value->sec, $value->usec);
179
+            	if($value->sec && $value->usec) {
180
+            	            		return new \MongoDate($value->sec, $value->usec);
181
+            	}
181 182
 
182 183
                 return array_map(
183 184
                     ['self', 'toLegacy'],
Please login to merge, or discard this patch.