@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public function loadMetadataForClass(\ReflectionClass $class): ?BaseClassMetadata |
26 | 26 | { |
27 | 27 | $classMetadata = new ClassMetadata($name = $class->name); |
28 | - $fileResource = $class->getFilename(); |
|
28 | + $fileResource = $class->getFilename(); |
|
29 | 29 | if (false !== $fileResource) { |
30 | 30 | $classMetadata->fileResources[] = $fileResource; |
31 | 31 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | $propertyMetadata = new PropertyMetadata($name, $property->getName()); |
39 | 39 | |
40 | - if (!$propertyMetadata->serializedName) { |
|
40 | + if ( ! $propertyMetadata->serializedName) { |
|
41 | 41 | $propertyMetadata->serializedName = $this->namingStrategy->translateName($propertyMetadata); |
42 | 42 | } |
43 | 43 |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $configured = false; |
81 | 81 | |
82 | 82 | $classMetadata = new ClassMetadata($name = $class->name); |
83 | - $fileResource = $class->getFilename(); |
|
83 | + $fileResource = $class->getFilename(); |
|
84 | 84 | |
85 | 85 | if (false !== $fileResource) { |
86 | 86 | $classMetadata->fileResources[] = $fileResource; |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | } |
167 | 167 | } |
168 | 168 | |
169 | - if (!$excludeAll) { |
|
169 | + if ( ! $excludeAll) { |
|
170 | 170 | foreach ($class->getProperties() as $property) { |
171 | 171 | if ($property->class !== $name || (isset($property->info) && $property->info['class'] !== $name)) { |
172 | 172 | continue; |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | } elseif ($annot instanceof Expose) { |
201 | 201 | $isExpose = true; |
202 | 202 | if (null !== $annot->if) { |
203 | - $propertyMetadata->excludeIf = $this->parseExpression('!(' . $annot->if . ')'); |
|
203 | + $propertyMetadata->excludeIf = $this->parseExpression('!('.$annot->if.')'); |
|
204 | 204 | } |
205 | 205 | } elseif ($annot instanceof Exclude) { |
206 | 206 | if (null !== $annot->if) { |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | throw new InvalidMetadataException(sprintf( |
248 | 248 | 'Invalid group name "%s" on "%s", did you mean to create multiple groups?', |
249 | 249 | implode(', ', $propertyMetadata->groups), |
250 | - $propertyMetadata->class . '->' . $propertyMetadata->name |
|
250 | + $propertyMetadata->class.'->'.$propertyMetadata->name |
|
251 | 251 | )); |
252 | 252 | } |
253 | 253 | } |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | } |
270 | 270 | } |
271 | 271 | |
272 | - if (!$propertyMetadata->serializedName) { |
|
272 | + if ( ! $propertyMetadata->serializedName) { |
|
273 | 273 | $propertyMetadata->serializedName = $this->namingStrategy->translateName($propertyMetadata); |
274 | 274 | } |
275 | 275 | |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | } |
281 | 281 | |
282 | 282 | if ( |
283 | - (ExclusionPolicy::NONE === $exclusionPolicy && !$isExclude) |
|
283 | + (ExclusionPolicy::NONE === $exclusionPolicy && ! $isExclude) |
|
284 | 284 | || (ExclusionPolicy::ALL === $exclusionPolicy && $isExpose) |
285 | 285 | ) { |
286 | 286 | $propertyMetadata->setAccessor($accessType, $accessor[0], $accessor[1]); |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | } |
290 | 290 | } |
291 | 291 | |
292 | - if (!$configured) { |
|
292 | + if ( ! $configured) { |
|
293 | 293 | return null; |
294 | 294 | } |
295 | 295 | |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | |
306 | 306 | if (PHP_VERSION_ID >= 80000) { |
307 | 307 | $annotations = array_map( |
308 | - static function (\ReflectionAttribute $attribute): object { |
|
308 | + static function(\ReflectionAttribute $attribute): object { |
|
309 | 309 | return $attribute->newInstance(); |
310 | 310 | }, |
311 | 311 | $class->getAttributes() |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | |
329 | 329 | if (PHP_VERSION_ID >= 80000) { |
330 | 330 | $annotations = array_map( |
331 | - static function (\ReflectionAttribute $attribute): object { |
|
331 | + static function(\ReflectionAttribute $attribute): object { |
|
332 | 332 | return $attribute->newInstance(); |
333 | 333 | }, |
334 | 334 | $method->getAttributes() |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | |
352 | 352 | if (PHP_VERSION_ID >= 80000) { |
353 | 353 | $annotations = array_map( |
354 | - static function (\ReflectionAttribute $attribute): object { |
|
354 | + static function(\ReflectionAttribute $attribute): object { |
|
355 | 355 | return $attribute->newInstance(); |
356 | 356 | }, |
357 | 357 | $property->getAttributes() |
@@ -60,7 +60,7 @@ |
||
60 | 60 | new AnnotationOrAttributeDriver($this->propertyNamingStrategy, $this->typeParser, $this->expressionEvaluator, $annotationReader), |
61 | 61 | ]); |
62 | 62 | |
63 | - if (!empty($metadataDirs)) { |
|
63 | + if ( ! empty($metadataDirs)) { |
|
64 | 64 | $fileLocator = new FileLocator($metadataDirs); |
65 | 65 | $driver = new DriverChain([ |
66 | 66 | new YamlDriver($fileLocator, $this->propertyNamingStrategy, $this->typeParser, $this->expressionEvaluator), |