@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\Serializer\NameConverter; |
| 15 | 15 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function denormalize($propertyName) |
| 75 | 75 | { |
| 76 | - $camelCasedName = preg_replace_callback('/(^|-|\.)+(.)/', function ($match) { |
|
| 76 | + $camelCasedName = preg_replace_callback('/(^|-|\.)+(.)/', function($match) { |
|
| 77 | 77 | return ('.' === $match[1] ? '-' : '').strtoupper($match[2]); |
| 78 | 78 | }, $propertyName); |
| 79 | 79 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\JsonApi\Serializer; |
| 15 | 15 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\JsonApi\EventListener; |
| 15 | 15 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\JsonApi\Serializer; |
| 15 | 15 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\JsonApi\Serializer; |
| 15 | 15 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\JsonApi\EventListener; |
| 15 | 15 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\JsonApi\EventListener; |
| 15 | 15 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\JsonApi\Serializer; |
| 15 | 15 | |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | * |
| 226 | 226 | * @param string $attribute |
| 227 | 227 | * @param PropertyMetadata $propertyMetadata |
| 228 | - * @param Type $type |
|
| 228 | + * @param \Symfony\Component\PropertyInfo\Type $type |
|
| 229 | 229 | * @param string $className |
| 230 | 230 | * @param mixed $value |
| 231 | 231 | * @param string|null $format |
@@ -385,7 +385,6 @@ discard block |
||
| 385 | 385 | /** |
| 386 | 386 | * Populates links and relationships keys. |
| 387 | 387 | * |
| 388 | - * @param array $data |
|
| 389 | 388 | * @param object $object |
| 390 | 389 | * @param string|null $format |
| 391 | 390 | * @param array $context |
@@ -462,7 +461,7 @@ discard block |
||
| 462 | 461 | * @param string|null $format |
| 463 | 462 | * @param array $context |
| 464 | 463 | * |
| 465 | - * @return bool|string |
|
| 464 | + * @return string|false |
|
| 466 | 465 | */ |
| 467 | 466 | private function getCacheKey(string $format = null, array $context) |
| 468 | 467 | { |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | -declare(strict_types=1); |
|
| 12 | +declare(strict_types = 1); |
|
| 13 | 13 | |
| 14 | 14 | namespace ApiPlatform\Core\JsonApi\Serializer; |
| 15 | 15 | |
@@ -155,8 +155,7 @@ discard block |
||
| 155 | 155 | |
| 156 | 156 | if (is_array($data) || $data instanceof \Countable) { |
| 157 | 157 | $returnDataArray['meta']['totalItems'] = $data instanceof PaginatorInterface ? |
| 158 | - $data->getTotalItems() : |
|
| 159 | - count($data); |
|
| 158 | + $data->getTotalItems() : count($data); |
|
| 160 | 159 | } |
| 161 | 160 | |
| 162 | 161 | if ($isPaginator) { |