@@ -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 |
@@ -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; |
@@ -323,7 +323,7 @@ |
||
| 323 | 323 | */ |
| 324 | 324 | protected function createWrapCase(bool $caseSensitive): \Closure |
| 325 | 325 | { |
| 326 | - return function (string $expr) use ($caseSensitive): string { |
|
| 326 | + return function(string $expr) use ($caseSensitive): string { |
|
| 327 | 327 | if ($caseSensitive) { |
| 328 | 328 | return $expr; |
| 329 | 329 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | public function __construct(ManagerRegistry $managerRegistry, RequestStack $requestStack, string $orderParameterName, LoggerInterface $logger = null, array $properties = null) |
| 45 | 45 | { |
| 46 | 46 | if (null !== $properties) { |
| 47 | - $properties = array_map(function ($propertyOptions) { |
|
| 47 | + $properties = array_map(function($propertyOptions) { |
|
| 48 | 48 | // shorthand for default direction |
| 49 | 49 | if (is_string($propertyOptions)) { |
| 50 | 50 | $propertyOptions = [ |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | * |
| 98 | 98 | * @throws RuntimeException when the max number of joins has been reached |
| 99 | 99 | */ |
| 100 | - private function joinRelations(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, bool $forceEager, string $parentAlias, array $propertyMetadataOptions = [], bool $wasLeftJoin = false, int &$joinCount = 0) |
|
| 100 | + private function joinRelations(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, bool $forceEager, string $parentAlias, array $propertyMetadataOptions = [], bool $wasLeftJoin = false, int & $joinCount = 0) |
|
| 101 | 101 | { |
| 102 | 102 | if ($joinCount > $this->maxJoins) { |
| 103 | 103 | throw new RuntimeException('The total number of joined relations has exceeded the specified maximum. Raise the limit if necessary.'); |
@@ -133,7 +133,6 @@ |
||
| 133 | 133 | * @param string $operationName |
| 134 | 134 | * @param array $operation |
| 135 | 135 | * @param string $resourceShortName |
| 136 | - * @param bool $collection |
|
| 137 | 136 | * |
| 138 | 137 | * @throws RuntimeException |
| 139 | 138 | */ |
@@ -201,7 +201,7 @@ |
||
| 201 | 201 | * @param string|null $format |
| 202 | 202 | * @param array $context |
| 203 | 203 | * |
| 204 | - * @return bool|string |
|
| 204 | + * @return string|false |
|
| 205 | 205 | */ |
| 206 | 206 | private function getHalCacheKey(string $format = null, array $context) |
| 207 | 207 | { |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $this->resourceClassResolver = $resourceClassResolver; |
| 52 | 52 | $this->propertyAccessor = $propertyAccessor ?: PropertyAccess::createPropertyAccessor(); |
| 53 | 53 | |
| 54 | - $this->setCircularReferenceHandler(function ($object) { |
|
| 54 | + $this->setCircularReferenceHandler(function($object) { |
|
| 55 | 55 | return $this->iriConverter->getIriFromItem($object); |
| 56 | 56 | }); |
| 57 | 57 | } |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | |
| 178 | 178 | /** |
| 179 | 179 | * @param \ArrayObject $pathOperation |
| 180 | - * @param array $mimeTypes |
|
| 180 | + * @param string[] $mimeTypes |
|
| 181 | 181 | * @param string $operationType |
| 182 | 182 | * @param ResourceMetadata $resourceMetadata |
| 183 | 183 | * @param string $resourceClass |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | |
| 233 | 233 | /** |
| 234 | 234 | * @param \ArrayObject $pathOperation |
| 235 | - * @param array $mimeTypes |
|
| 235 | + * @param string[] $mimeTypes |
|
| 236 | 236 | * @param string $operationType |
| 237 | 237 | * @param ResourceMetadata $resourceMetadata |
| 238 | 238 | * @param string $resourceClass |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | |
| 268 | 268 | /** |
| 269 | 269 | * @param \ArrayObject $pathOperation |
| 270 | - * @param array $mimeTypes |
|
| 270 | + * @param string[] $mimeTypes |
|
| 271 | 271 | * @param string $operationType |
| 272 | 272 | * @param ResourceMetadata $resourceMetadata |
| 273 | 273 | * @param string $resourceClass |