@@ -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 | } |
@@ -215,7 +215,7 @@ |
||
| 215 | 215 | * @param string|null $format |
| 216 | 216 | * @param array $context |
| 217 | 217 | * |
| 218 | - * @return bool|string |
|
| 218 | + * @return string|false |
|
| 219 | 219 | */ |
| 220 | 220 | private function getCacheKey(string $format = null, array $context) |
| 221 | 221 | { |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | * |
| 66 | 66 | * @param string $resourceClass |
| 67 | 67 | * |
| 68 | - * @return array |
|
| 68 | + * @return null|string |
|
| 69 | 69 | */ |
| 70 | 70 | private function getMetadata(string $resourceClass) : array |
| 71 | 71 | { |
@@ -286,7 +286,7 @@ |
||
| 286 | 286 | */ |
| 287 | 287 | protected function createWrapCase(bool $caseSensitive) : \Closure |
| 288 | 288 | { |
| 289 | - return function (string $expr) use ($caseSensitive) : string { |
|
| 289 | + return function(string $expr) use ($caseSensitive) : string { |
|
| 290 | 290 | if ($caseSensitive) { |
| 291 | 291 | return $expr; |
| 292 | 292 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | /** |
| 171 | 171 | * @param \ArrayObject $pathOperation |
| 172 | - * @param array $mimeTypes |
|
| 172 | + * @param string[] $mimeTypes |
|
| 173 | 173 | * @param bool $collection |
| 174 | 174 | * @param ResourceMetadata $resourceMetadata |
| 175 | 175 | * @param string $resourceClass |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | |
| 220 | 220 | /** |
| 221 | 221 | * @param \ArrayObject $pathOperation |
| 222 | - * @param array $mimeTypes |
|
| 222 | + * @param string[] $mimeTypes |
|
| 223 | 223 | * @param bool $collection |
| 224 | 224 | * @param ResourceMetadata $resourceMetadata |
| 225 | 225 | * @param string $resourceClass |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | |
| 255 | 255 | /** |
| 256 | 256 | * @param \ArrayObject $pathOperation |
| 257 | - * @param array $mimeTypes |
|
| 257 | + * @param string[] $mimeTypes |
|
| 258 | 258 | * @param bool $collection |
| 259 | 259 | * @param ResourceMetadata $resourceMetadata |
| 260 | 260 | * @param string $resourceClass |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | ->useAttributeAsKey('exception_class') |
| 105 | 105 | ->beforeNormalization() |
| 106 | 106 | ->ifArray() |
| 107 | - ->then(function (array $exceptionToStatus) { |
|
| 107 | + ->then(function(array $exceptionToStatus) { |
|
| 108 | 108 | foreach ($exceptionToStatus as &$httpStatusCode) { |
| 109 | 109 | if (is_int($httpStatusCode)) { |
| 110 | 110 | continue; |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | ->prototype('integer')->end() |
| 122 | 122 | ->validate() |
| 123 | 123 | ->ifArray() |
| 124 | - ->then(function (array $exceptionToStatus) { |
|
| 124 | + ->then(function(array $exceptionToStatus) { |
|
| 125 | 125 | foreach ($exceptionToStatus as $httpStatusCode) { |
| 126 | 126 | if ($httpStatusCode < 100 || $httpStatusCode >= 600) { |
| 127 | 127 | throw new InvalidConfigurationException(sprintf('The HTTP status code "%s" is not valid.', $httpStatusCode)); |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | ->useAttributeAsKey('format') |
| 154 | 154 | ->beforeNormalization() |
| 155 | 155 | ->ifArray() |
| 156 | - ->then(function ($v) { |
|
| 156 | + ->then(function($v) { |
|
| 157 | 157 | foreach ($v as $format => $value) { |
| 158 | 158 | if (isset($value['mime_types'])) { |
| 159 | 159 | continue; |
@@ -132,7 +132,7 @@ |
||
| 132 | 132 | * |
| 133 | 133 | * @throws RuntimeException when the max number of joins has been reached |
| 134 | 134 | */ |
| 135 | - private function joinRelations(QueryBuilder $queryBuilder, string $resourceClass, array $propertyMetadataOptions = [], string $originAlias = 'o', string &$relationAlias = 'a', bool $wasLeftJoin = false, int &$joinCount = 0) |
|
| 135 | + private function joinRelations(QueryBuilder $queryBuilder, string $resourceClass, array $propertyMetadataOptions = [], string $originAlias = 'o', string & $relationAlias = 'a', bool $wasLeftJoin = false, int & $joinCount = 0) |
|
| 136 | 136 | { |
| 137 | 137 | if ($joinCount > $this->maxJoins) { |
| 138 | 138 | throw new RuntimeException('The total number of joined relations has exceeded the specified maximum. Raise the limit if necessary.'); |