@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /* |
3 | 3 | * This file is part of the KleijnWeb\PhpApi\Hydrator package. |
4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /* |
3 | 3 | * This file is part of the KleijnWeb\PhpApi\Hydrator package. |
4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /* |
3 | 3 | * This file is part of the KleijnWeb\PhpApi\Hydrator package. |
4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /* |
3 | 3 | * This file is part of the KleijnWeb\PhpApi\Hydrator package. |
4 | 4 | * |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /* |
3 | 3 | * This file is part of the KleijnWeb\PhpApi\Hydrator package. |
4 | 4 | * |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | /** |
16 | 16 | * @var array |
17 | 17 | */ |
18 | - private $resourceNamespaces = []; |
|
18 | + private $resourceNamespaces = [ ]; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * ClassNameResolver constructor. |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /* |
3 | 3 | * This file is part of the KleijnWeb\PhpApi\Hydrator package. |
4 | 4 | * |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /* |
3 | 3 | * This file is part of the KleijnWeb\PhpApi\Hydrator package. |
4 | 4 | * |
@@ -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,18 +143,18 @@ 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 | } |
155 | 155 | if ($this->shouldTreatAsObject($node, $schema)) { |
156 | 156 | if (!$node instanceof \stdClass) { |
157 | - $data = (object)[]; |
|
157 | + $data = (object)[ ]; |
|
158 | 158 | $reflector = new \ReflectionObject($node); |
159 | 159 | |
160 | 160 | foreach ($reflector->getProperties() as $attribute) { |