@@ -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 | |
@@ -144,18 +144,18 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | if ($this->shouldTreatAsArray($node, $schema)) { |
| 146 | 146 | if ($schema instanceof ArraySchema) { |
| 147 | - return array_map(function ($value) use ($schema) { |
|
| 147 | + return array_map(function($value) use ($schema) { |
|
| 148 | 148 | return $this->dehydrateNode($value, $schema->getItemsSchema()); |
| 149 | 149 | }, $node); |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | - return array_map(function ($value) { |
|
| 152 | + return array_map(function($value) { |
|
| 153 | 153 | return $this->dehydrateNode($value, $this->anySchema); |
| 154 | 154 | }, $node); |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | if ($this->shouldTreatAsObject($node, $schema)) { |
| 158 | - $data = (object)[]; |
|
| 158 | + $data = (object)[ ]; |
|
| 159 | 159 | |
| 160 | 160 | if (!$node instanceof \stdClass) { |
| 161 | 161 | $reflector = new \ReflectionObject($node); |