Completed
Pull Request — master (#1036)
by Hector
07:36 queued 04:27
created
src/JsonApi/Serializer/ItemNormalizer.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -262,7 +262,6 @@  discard block
 block discarded – undo
262 262
     /**
263 263
      * Populates links and relationships keys.
264 264
      *
265
-     * @param array       $data
266 265
      * @param object      $object
267 266
      * @param string|null $format
268 267
      * @param array       $context
@@ -362,7 +361,7 @@  discard block
 block discarded – undo
362 361
      * @param string|null $format
363 362
      * @param array       $context
364 363
      *
365
-     * @return bool|string
364
+     * @return string|false
366 365
      */
367 366
     private function getCacheKey(string $format = null, array $context)
368 367
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -236,8 +236,7 @@
 block discarded – undo
236 236
                     (
237 237
                         null !== $className
238 238
                             && $this->resourceClassResolver->isResourceClass($className)
239
-                                ? $this->resourceMetadataFactory->create($className)->getShortName() :
240
-                                ''
239
+                                ? $this->resourceMetadataFactory->create($className)->getShortName() : ''
241 240
                     );
242 241
             }
243 242
 
Please login to merge, or discard this patch.
src/Serializer/NameConverter/CamelCaseToDashedCaseNameConverter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
      */
72 72
     public function denormalize($propertyName)
73 73
     {
74
-        $camelCasedName = preg_replace_callback('/(^|-|\.)+(.)/', function ($match) {
74
+        $camelCasedName = preg_replace_callback('/(^|-|\.)+(.)/', function($match) {
75 75
             return ('.' === $match[1] ? '-' : '').strtoupper($match[2]);
76 76
         }, $propertyName);
77 77
 
Please login to merge, or discard this patch.
src/JsonApi/Serializer/CollectionNormalizer.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -190,8 +190,7 @@
 block discarded – undo
190 190
 
191 191
         if (is_array($data) || $data instanceof \Countable) {
192 192
             $returnDataArray['meta']['totalItems'] = $data instanceof PaginatorInterface ?
193
-                (int) $data->getTotalItems() :
194
-                count($data);
193
+                (int) $data->getTotalItems() : count($data);
195 194
         }
196 195
 
197 196
         if ($isPaginator) {
Please login to merge, or discard this patch.