@@ -261,10 +261,10 @@ discard block |
||
261 | 261 | private function createPsr7Request(Request $request) |
262 | 262 | { |
263 | 263 | return new Psr7Request( |
264 | - function () use ($request) { |
|
264 | + function() use ($request) { |
|
265 | 265 | return $request->getMethod(); |
266 | 266 | }, |
267 | - function ($name) use ($request) { |
|
267 | + function($name) use ($request) { |
|
268 | 268 | $header = $request->headers->get($name); |
269 | 269 | if (!is_array($header)) { |
270 | 270 | $header = array($header); |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | |
273 | 273 | return $header; |
274 | 274 | }, |
275 | - function () use ($request) { |
|
275 | + function() use ($request) { |
|
276 | 276 | return $request->query->all(); |
277 | 277 | } |
278 | 278 | ); |
@@ -108,7 +108,7 @@ |
||
108 | 108 | null, |
109 | 109 | 422, |
110 | 110 | self::INVALID_DISCRIMINATOR_VALUE, |
111 | - str_replace('{{value}}', (string) $value, $this->discError) |
|
111 | + str_replace('{{value}}', (string) $value, $this->discError) |
|
112 | 112 | ); |
113 | 113 | |
114 | 114 | throw new JsonApiException($error, 422); |
@@ -489,7 +489,7 @@ |
||
489 | 489 | /** |
490 | 490 | * Parse property loaders |
491 | 491 | * |
492 | - * @param array|Loader[] $loaders |
|
492 | + * @param \Reva2\JsonApi\Annotations\Reva2\JsonApi\Annotations\Loader[] $loaders |
|
493 | 493 | * @return array |
494 | 494 | */ |
495 | 495 | private function parseLoaders(array $loaders) |
@@ -685,7 +685,7 @@ discard block |
||
685 | 685 | return $this->parseArray( |
686 | 686 | $data, |
687 | 687 | $path, |
688 | - function ($data, $path, DataParser $parser) use ($typeParams) { |
|
688 | + function($data, $path, DataParser $parser) use ($typeParams) { |
|
689 | 689 | return $parser->parseScalarValue($data, $path, $typeParams); |
690 | 690 | } |
691 | 691 | ); |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | return $this->parseArray( |
696 | 696 | $data, |
697 | 697 | $path, |
698 | - function ($data, $path, DataParser $parser) use ($format) { |
|
698 | + function($data, $path, DataParser $parser) use ($format) { |
|
699 | 699 | return $parser->parseDateTime($data, $path, $format); |
700 | 700 | } |
701 | 701 | ); |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | return $this->parseArray( |
705 | 705 | $data, |
706 | 706 | $path, |
707 | - function ($data, $path, DataParser $parser) use ($typeParams, $propMetadata) { |
|
707 | + function($data, $path, DataParser $parser) use ($typeParams, $propMetadata) { |
|
708 | 708 | return $parser->parseResourceOrObject($data, $path, $typeParams, $propMetadata); |
709 | 709 | } |
710 | 710 | ); |
@@ -713,7 +713,7 @@ discard block |
||
713 | 713 | return $this->parseArray( |
714 | 714 | $data, |
715 | 715 | $path, |
716 | - function ($data, $path, DataParser $parser) use ($typeParams, $propMetadata) { |
|
716 | + function($data, $path, DataParser $parser) use ($typeParams, $propMetadata) { |
|
717 | 717 | return $parser->parseArrayValue($data, $path, $typeParams, $propMetadata); |
718 | 718 | } |
719 | 719 | ); |
@@ -722,7 +722,7 @@ discard block |
||
722 | 722 | return $this->parseArray( |
723 | 723 | $data, |
724 | 724 | $path, |
725 | - function ($data, $path, DataParser $parser) { |
|
725 | + function($data, $path, DataParser $parser) { |
|
726 | 726 | return $parser->parseRaw($data, $path); |
727 | 727 | } |
728 | 728 | ); |
@@ -931,14 +931,14 @@ discard block |
||
931 | 931 | private function parseArrayRelationship($data, $pathValue, PropertyMetadataInterface $relationship) |
932 | 932 | { |
933 | 933 | |
934 | - $data = $this->parseArray($data, $relationship->getDataPath(), function ($data, $path) use ($relationship) { |
|
934 | + $data = $this->parseArray($data, $relationship->getDataPath(), function($data, $path) use ($relationship) { |
|
935 | 935 | $resType = null; |
936 | 936 | if ($this->hasValue($data, $path . '.type')) { |
937 | 937 | $resType = $this->parseString($data, $path . '.type'); |
938 | 938 | } |
939 | 939 | |
940 | 940 | $resId = null; |
941 | - if ($this->hasValue($data, $path .'.id')) { |
|
941 | + if ($this->hasValue($data, $path . '.id')) { |
|
942 | 942 | $resId = $this->getValue($data, $path . '.id'); |
943 | 943 | } |
944 | 944 | |
@@ -960,7 +960,7 @@ discard block |
||
960 | 960 | |
961 | 961 | $parsed = $this->parseResourceOrObject( |
962 | 962 | [$idx => $linkedData], |
963 | - '[' . $idx .']', |
|
963 | + '[' . $idx . ']', |
|
964 | 964 | $params[1], |
965 | 965 | $relationship |
966 | 966 | ); |