@@ -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. |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | private function hydrateNode($node, Schema $schema) |
| 91 | 91 | { |
| 92 | 92 | if ($schema instanceof ArraySchema) { |
| 93 | - return array_map(function ($value) use ($schema) { |
|
| 93 | + return array_map(function($value) use ($schema) { |
|
| 94 | 94 | return $this->hydrateNode($value, $schema->getItemsSchema()); |
| 95 | 95 | }, $node); |
| 96 | 96 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | return $object; |
| 107 | 107 | } |
| 108 | - $fqcn = $this->classNameResolver->resolve($schema->getComplexType()->getName());; |
|
| 108 | + $fqcn = $this->classNameResolver->resolve($schema->getComplexType()->getName()); ; |
|
| 109 | 109 | $object = unserialize(sprintf('O:%d:"%s":0:{}', strlen($fqcn), $fqcn)); |
| 110 | 110 | $reflector = new \ReflectionObject($object); |
| 111 | 111 | |
@@ -143,12 +143,12 @@ discard block |
||
| 143 | 143 | } |
| 144 | 144 | if ($this->shouldTreatAsArray($node, $schema)) { |
| 145 | 145 | if ($schema instanceof ArraySchema) { |
| 146 | - return array_map(function ($value) use ($schema) { |
|
| 146 | + return array_map(function($value) use ($schema) { |
|
| 147 | 147 | return $this->dehydrateNode($value, $schema->getItemsSchema()); |
| 148 | 148 | }, $node); |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | - return array_map(function ($value) { |
|
| 151 | + return array_map(function($value) { |
|
| 152 | 152 | return $this->dehydrateNode($value, $this->anySchema); |
| 153 | 153 | }, $node); |
| 154 | 154 | } |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $class = get_class($node); |
| 158 | 158 | $offset = strlen($class) + 2; |
| 159 | 159 | $data = (array)$node; |
| 160 | - $array = array_filter(array_combine(array_map(function ($k) use ($offset) { |
|
| 160 | + $array = array_filter(array_combine(array_map(function($k) use ($offset) { |
|
| 161 | 161 | return substr($k, $offset); |
| 162 | 162 | }, array_keys($data)), array_values($data))); |
| 163 | 163 | $node = (object)$array; |