Completed
Pull Request — master (#1036)
by Hector
03:29
created
src/Serializer/NameConverter/CamelCaseToDashedCaseNameConverter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/JsonApi/Serializer/ErrorNormalizer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/JsonApi/EventListener/TransformSortingParametersListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/JsonApi/Serializer/EntrypointNormalizer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/JsonApi/Serializer/ConstraintViolationListNormalizer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/JsonApi/EventListener/TransformFilteringParametersListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/JsonApi/EventListener/FlattenPaginationParametersListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/JsonApi/Serializer/ItemNormalizer.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
src/JsonApi/Serializer/CollectionNormalizer.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.