@@ -262,7 +262,6 @@ discard block |
||
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 |
||
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 | { |
@@ -236,8 +236,7 @@ |
||
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 |
@@ -129,13 +129,13 @@ |
||
129 | 129 | $value |
130 | 130 | ): ResourceMetadata |
131 | 131 | { |
132 | - $getter = 'get' . ucfirst($property); |
|
132 | + $getter = 'get'.ucfirst($property); |
|
133 | 133 | |
134 | 134 | if (null !== $resourceMetadata->$getter()) { |
135 | 135 | return $resourceMetadata; |
136 | 136 | } |
137 | 137 | |
138 | - $wither = 'with' . ucfirst($property); |
|
138 | + $wither = 'with'.ucfirst($property); |
|
139 | 139 | |
140 | 140 | return $resourceMetadata->$wither($value); |
141 | 141 | } |
@@ -178,8 +178,7 @@ |
||
178 | 178 | |
179 | 179 | if (is_array($object) || $object instanceof \Countable) { |
180 | 180 | $data['meta']['totalItems'] = $object instanceof PaginatorInterface ? |
181 | - (int) $object->getTotalItems() : |
|
182 | - count($object); |
|
181 | + (int) $object->getTotalItems() : count($object); |
|
183 | 182 | } |
184 | 183 | |
185 | 184 | if ($isPaginator) { |
@@ -71,7 +71,7 @@ |
||
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 |