@@ -103,16 +103,16 @@ |
||
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 |