@@ -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 | } |
@@ -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 |
@@ -307,21 +307,21 @@ |
||
307 | 307 | return $value; |
308 | 308 | } |
309 | 309 | |
310 | - /** |
|
311 | - * Normalize the values array. |
|
312 | - * |
|
313 | - * @param array $values |
|
314 | - * |
|
315 | - * @return array |
|
316 | - */ |
|
317 | - private function normalizeValues(array $values) : array |
|
318 | - { |
|
319 | - foreach ($values as $key => $value) { |
|
320 | - if (!is_int($key) || !is_string($value)) { |
|
321 | - unset($values[$key]); |
|
322 | - } |
|
323 | - } |
|
324 | - |
|
325 | - return array_values($values); |
|
326 | - } |
|
310 | + /** |
|
311 | + * Normalize the values array. |
|
312 | + * |
|
313 | + * @param array $values |
|
314 | + * |
|
315 | + * @return array |
|
316 | + */ |
|
317 | + private function normalizeValues(array $values) : array |
|
318 | + { |
|
319 | + foreach ($values as $key => $value) { |
|
320 | + if (!is_int($key) || !is_string($value)) { |
|
321 | + unset($values[$key]); |
|
322 | + } |
|
323 | + } |
|
324 | + |
|
325 | + return array_values($values); |
|
326 | + } |
|
327 | 327 | } |
@@ -139,7 +139,7 @@ |
||
139 | 139 | * |
140 | 140 | * @param string $property |
141 | 141 | * |
142 | - * @return array |
|
142 | + * @return string |
|
143 | 143 | */ |
144 | 144 | protected function splitPropertyParts(string $property) : array |
145 | 145 | { |