@@ -55,7 +55,7 @@ |
||
| 55 | 55 | |
| 56 | 56 | $source = preg_replace_callback( |
| 57 | 57 | '/(^|(?<=&))[^=[&]+/', |
| 58 | - function ($key) { |
|
| 58 | + function($key) { |
|
| 59 | 59 | return bin2hex(urldecode($key[0])); |
| 60 | 60 | }, |
| 61 | 61 | $source |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | $this->contextBuilder = $contextBuilder; |
| 57 | 57 | $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); |
| 58 | 58 | |
| 59 | - $this->setCircularReferenceHandler(function ($object) { |
|
| 59 | + $this->setCircularReferenceHandler(function($object) { |
|
| 60 | 60 | return $this->iriConverter->getIriFromItem($object); |
| 61 | 61 | }); |
| 62 | 62 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | ->useAttributeAsKey('format') |
| 41 | 41 | ->beforeNormalization() |
| 42 | 42 | ->ifArray() |
| 43 | - ->then(function ($v) { |
|
| 43 | + ->then(function($v) { |
|
| 44 | 44 | foreach ($v as $format => $value) { |
| 45 | 45 | if (isset($value['mime_types'])) { |
| 46 | 46 | continue; |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | */ |
| 49 | 49 | public function __invoke(Request $request, $id) |
| 50 | 50 | { |
| 51 | - list($resourceClass, , $operationName, $format) = $this->extractAttributes($request); |
|
| 51 | + list($resourceClass,, $operationName, $format) = $this->extractAttributes($request); |
|
| 52 | 52 | $data = $this->getItem($this->itemDataProvider, $resourceClass, $operationName, $id); |
| 53 | 53 | |
| 54 | 54 | $context = ['object_to_populate' => $data, 'resource_class' => $resourceClass, 'item_operation_name' => $operationName]; |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function __invoke(Request $request) |
| 44 | 44 | { |
| 45 | - list($resourceClass, $operationName, , $format) = $this->extractAttributes($request); |
|
| 45 | + list($resourceClass, $operationName,, $format) = $this->extractAttributes($request); |
|
| 46 | 46 | $context = ['resource_class' => $resourceClass, 'collection_operation_name' => $operationName]; |
| 47 | 47 | |
| 48 | 48 | return $this->serializer->deserialize($request->getContent(), $resourceClass, $format, $context); |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | */ |
| 46 | 46 | public function __invoke(Request $request, $id) |
| 47 | 47 | { |
| 48 | - list($resourceClass, , $operationName) = $this->extractAttributes($request); |
|
| 48 | + list($resourceClass,, $operationName) = $this->extractAttributes($request); |
|
| 49 | 49 | |
| 50 | 50 | return $this->getItem($this->itemDataProvider, $resourceClass, $operationName, $id); |
| 51 | 51 | } |
@@ -162,7 +162,7 @@ |
||
| 162 | 162 | /** |
| 163 | 163 | * Transforms an xml dom to an array. |
| 164 | 164 | * |
| 165 | - * @param DomElement $node |
|
| 165 | + * @param DOMElement $node |
|
| 166 | 166 | * @param nodes relative root reference $nodes |
| 167 | 167 | */ |
| 168 | 168 | private function toArray(DomElement $node, array &$nodes = []) : array |
@@ -15,7 +15,6 @@ |
||
| 15 | 15 | use ApiPlatform\Core\Exception\ResourceClassNotFoundException; |
| 16 | 16 | use ApiPlatform\Core\Metadata\Resource\ResourceMetadata; |
| 17 | 17 | use DOMDocument; |
| 18 | -use DOMElement; |
|
| 19 | 18 | use DOMXpath; |
| 20 | 19 | |
| 21 | 20 | /** |
@@ -153,11 +153,11 @@ |
||
| 153 | 153 | $paths = array_merge($paths, glob($glob, GLOB_BRACE | GLOB_NOSORT)); |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | - $yamlPaths = array_filter($paths, function ($v) { |
|
| 156 | + $yamlPaths = array_filter($paths, function($v) { |
|
| 157 | 157 | return preg_match('/\.yml$/', $v); |
| 158 | 158 | }); |
| 159 | 159 | |
| 160 | - $xmlPaths = array_filter($paths, function ($v) { |
|
| 160 | + $xmlPaths = array_filter($paths, function($v) { |
|
| 161 | 161 | return preg_match('/\.xml$/', $v); |
| 162 | 162 | }); |
| 163 | 163 | |