@@ -14,7 +14,7 @@ |
||
14 | 14 | /** |
15 | 15 | * @var array |
16 | 16 | */ |
17 | - private $resourceNamespaces = []; |
|
17 | + private $resourceNamespaces = [ ]; |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * ClassNameResolver constructor. |
@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public function hydrate($data, Schema $schema) |
62 | 62 | { |
63 | - $processNode = function ($node, Schema $schema) use (&$processNode) { |
|
63 | + $processNode = function($node, Schema $schema) use (&$processNode) { |
|
64 | 64 | if ($schema instanceof ArraySchema) { |
65 | - return array_map(function ($value) use (&$processNode, $schema) { |
|
65 | + return array_map(function($value) use (&$processNode, $schema) { |
|
66 | 66 | return $processNode($value, $schema->getItemsSchema()); |
67 | 67 | }, $node); |
68 | 68 | } |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | return $dateTimeSerializer->serialize($node, $schema); |
162 | 162 | } |
163 | 163 | if ($schema instanceof ArraySchema) { |
164 | - return array_map(function ($value) use ($schema, $dateTimeSerializer) { |
|
164 | + return array_map(function($value) use ($schema, $dateTimeSerializer) { |
|
165 | 165 | return self::dehydrateNode($value, $schema->getItemsSchema(), $dateTimeSerializer); |
166 | 166 | }, $node); |
167 | 167 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $class = get_class($node); |
171 | 171 | $offset = strlen($class) + 2; |
172 | 172 | $data = (array)$node; |
173 | - $array = array_filter(array_combine(array_map(function ($k) use ($offset) { |
|
173 | + $array = array_filter(array_combine(array_map(function($k) use ($offset) { |
|
174 | 174 | return substr($k, $offset); |
175 | 175 | }, array_keys($data)), array_values($data))); |
176 | 176 | $node = (object)$array; |