@@ -14,12 +14,12 @@ discard block |
||
| 14 | 14 | protected function getClassAnnotations(\ReflectionClass $class): array |
| 15 | 15 | { |
| 16 | 16 | return array_map( |
| 17 | - static function (\ReflectionAttribute $attribute): object { |
|
| 17 | + static function(\ReflectionAttribute $attribute): object { |
|
| 18 | 18 | return $attribute->newInstance(); |
| 19 | 19 | }, |
| 20 | 20 | array_filter( |
| 21 | 21 | $class->getAttributes(), |
| 22 | - static function (\ReflectionAttribute $attribute): bool { |
|
| 22 | + static function(\ReflectionAttribute $attribute): bool { |
|
| 23 | 23 | return class_exists($attribute->getName()); |
| 24 | 24 | } |
| 25 | 25 | ) |
@@ -32,12 +32,12 @@ discard block |
||
| 32 | 32 | protected function getMethodAnnotations(\ReflectionMethod $method): array |
| 33 | 33 | { |
| 34 | 34 | return array_map( |
| 35 | - static function (\ReflectionAttribute $attribute): object { |
|
| 35 | + static function(\ReflectionAttribute $attribute): object { |
|
| 36 | 36 | return $attribute->newInstance(); |
| 37 | 37 | }, |
| 38 | 38 | array_filter( |
| 39 | 39 | $method->getAttributes(), |
| 40 | - static function (\ReflectionAttribute $attribute): bool { |
|
| 40 | + static function(\ReflectionAttribute $attribute): bool { |
|
| 41 | 41 | return class_exists($attribute->getName()); |
| 42 | 42 | } |
| 43 | 43 | ) |
@@ -50,12 +50,12 @@ discard block |
||
| 50 | 50 | protected function getPropertyAnnotations(\ReflectionProperty $property): array |
| 51 | 51 | { |
| 52 | 52 | return array_map( |
| 53 | - static function (\ReflectionAttribute $attribute): object { |
|
| 53 | + static function(\ReflectionAttribute $attribute): object { |
|
| 54 | 54 | return $attribute->newInstance(); |
| 55 | 55 | }, |
| 56 | 56 | array_filter( |
| 57 | 57 | $property->getAttributes(), |
| 58 | - static function (\ReflectionAttribute $attribute): bool { |
|
| 58 | + static function(\ReflectionAttribute $attribute): bool { |
|
| 59 | 59 | return class_exists($attribute->getName()); |
| 60 | 60 | } |
| 61 | 61 | ) |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $configured = false; |
| 83 | 83 | |
| 84 | 84 | $classMetadata = new ClassMetadata($name = $class->name); |
| 85 | - $fileResource = $class->getFilename(); |
|
| 85 | + $fileResource = $class->getFilename(); |
|
| 86 | 86 | |
| 87 | 87 | if (false !== $fileResource) { |
| 88 | 88 | $classMetadata->fileResources[] = $fileResource; |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | - if (!$excludeAll) { |
|
| 171 | + if ( ! $excludeAll) { |
|
| 172 | 172 | foreach ($class->getProperties() as $property) { |
| 173 | 173 | if ($property->class !== $name || (isset($property->info) && $property->info['class'] !== $name)) { |
| 174 | 174 | continue; |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | } elseif ($annot instanceof Expose) { |
| 203 | 203 | $isExpose = true; |
| 204 | 204 | if (null !== $annot->if) { |
| 205 | - $propertyMetadata->excludeIf = $this->parseExpression('!(' . $annot->if . ')'); |
|
| 205 | + $propertyMetadata->excludeIf = $this->parseExpression('!('.$annot->if.')'); |
|
| 206 | 206 | } |
| 207 | 207 | } elseif ($annot instanceof Exclude) { |
| 208 | 208 | if (null !== $annot->if) { |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | throw new InvalidMetadataException(sprintf( |
| 250 | 250 | 'Invalid group name "%s" on "%s", did you mean to create multiple groups?', |
| 251 | 251 | implode(', ', $propertyMetadata->groups), |
| 252 | - $propertyMetadata->class . '->' . $propertyMetadata->name |
|
| 252 | + $propertyMetadata->class.'->'.$propertyMetadata->name |
|
| 253 | 253 | )); |
| 254 | 254 | } |
| 255 | 255 | } |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | } |
| 272 | 272 | } |
| 273 | 273 | |
| 274 | - if (!$propertyMetadata->serializedName) { |
|
| 274 | + if ( ! $propertyMetadata->serializedName) { |
|
| 275 | 275 | $propertyMetadata->serializedName = $this->namingStrategy->translateName($propertyMetadata); |
| 276 | 276 | } |
| 277 | 277 | |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | } |
| 283 | 283 | |
| 284 | 284 | if ( |
| 285 | - (ExclusionPolicy::NONE === $exclusionPolicy && !$isExclude) |
|
| 285 | + (ExclusionPolicy::NONE === $exclusionPolicy && ! $isExclude) |
|
| 286 | 286 | || (ExclusionPolicy::ALL === $exclusionPolicy && $isExpose) |
| 287 | 287 | ) { |
| 288 | 288 | $propertyMetadata->setAccessor($accessType, $accessor[0], $accessor[1]); |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | } |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | - if (!$configured) { |
|
| 294 | + if ( ! $configured) { |
|
| 295 | 295 | // return null; |
| 296 | 296 | // uncomment the above line afetr a couple of months |
| 297 | 297 | } |
@@ -308,12 +308,12 @@ discard block |
||
| 308 | 308 | |
| 309 | 309 | if (PHP_VERSION_ID >= 80000) { |
| 310 | 310 | $annotations = array_map( |
| 311 | - static function (\ReflectionAttribute $attribute): object { |
|
| 311 | + static function(\ReflectionAttribute $attribute): object { |
|
| 312 | 312 | return $attribute->newInstance(); |
| 313 | 313 | }, |
| 314 | 314 | array_filter( |
| 315 | 315 | $class->getAttributes(), |
| 316 | - static function (\ReflectionAttribute $attribute): bool { |
|
| 316 | + static function(\ReflectionAttribute $attribute): bool { |
|
| 317 | 317 | return class_exists($attribute->getName()); |
| 318 | 318 | } |
| 319 | 319 | ) |
@@ -336,12 +336,12 @@ discard block |
||
| 336 | 336 | |
| 337 | 337 | if (PHP_VERSION_ID >= 80000) { |
| 338 | 338 | $annotations = array_map( |
| 339 | - static function (\ReflectionAttribute $attribute): object { |
|
| 339 | + static function(\ReflectionAttribute $attribute): object { |
|
| 340 | 340 | return $attribute->newInstance(); |
| 341 | 341 | }, |
| 342 | 342 | array_filter( |
| 343 | 343 | $method->getAttributes(), |
| 344 | - static function (\ReflectionAttribute $attribute): bool { |
|
| 344 | + static function(\ReflectionAttribute $attribute): bool { |
|
| 345 | 345 | return class_exists($attribute->getName()); |
| 346 | 346 | } |
| 347 | 347 | ) |
@@ -364,12 +364,12 @@ discard block |
||
| 364 | 364 | |
| 365 | 365 | if (PHP_VERSION_ID >= 80000) { |
| 366 | 366 | $annotations = array_map( |
| 367 | - static function (\ReflectionAttribute $attribute): object { |
|
| 367 | + static function(\ReflectionAttribute $attribute): object { |
|
| 368 | 368 | return $attribute->newInstance(); |
| 369 | 369 | }, |
| 370 | 370 | array_filter( |
| 371 | 371 | $property->getAttributes(), |
| 372 | - static function (\ReflectionAttribute $attribute): bool { |
|
| 372 | + static function(\ReflectionAttribute $attribute): bool { |
|
| 373 | 373 | return class_exists($attribute->getName()); |
| 374 | 374 | } |
| 375 | 375 | ) |