Passed
Pull Request — master (#1394)
by
unknown
02:56
created
src/Metadata/Driver/AnnotationOrAttributeDriver.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         $configured = false;
82 82
 
83 83
         $classMetadata = new ClassMetadata($name = $class->name);
84
-        $fileResource =  $class->getFilename();
84
+        $fileResource = $class->getFilename();
85 85
 
86 86
         if (false !== $fileResource) {
87 87
             $classMetadata->fileResources[] = $fileResource;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             }
168 168
         }
169 169
 
170
-        if (!$excludeAll) {
170
+        if ( ! $excludeAll) {
171 171
             foreach ($class->getProperties() as $property) {
172 172
                 if ($property->class !== $name || (isset($property->info) && $property->info['class'] !== $name)) {
173 173
                     continue;
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
                     } elseif ($annot instanceof Expose) {
202 202
                         $isExpose = true;
203 203
                         if (null !== $annot->if) {
204
-                            $propertyMetadata->excludeIf = $this->parseExpression('!(' . $annot->if . ')');
204
+                            $propertyMetadata->excludeIf = $this->parseExpression('!('.$annot->if.')');
205 205
                         }
206 206
                     } elseif ($annot instanceof Exclude) {
207 207
                         if (null !== $annot->if) {
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
                                 throw new InvalidMetadataException(sprintf(
249 249
                                     'Invalid group name "%s" on "%s", did you mean to create multiple groups?',
250 250
                                     implode(', ', $propertyMetadata->groups),
251
-                                    $propertyMetadata->class . '->' . $propertyMetadata->name,
251
+                                    $propertyMetadata->class.'->'.$propertyMetadata->name,
252 252
                                 ));
253 253
                             }
254 254
                         }
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
                     }
271 271
                 }
272 272
 
273
-                if (!$propertyMetadata->serializedName) {
273
+                if ( ! $propertyMetadata->serializedName) {
274 274
                     $propertyMetadata->serializedName = $this->namingStrategy->translateName($propertyMetadata);
275 275
                 }
276 276
 
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
                 }
282 282
 
283 283
                 if (
284
-                    (ExclusionPolicy::NONE === $exclusionPolicy && !$isExclude)
284
+                    (ExclusionPolicy::NONE === $exclusionPolicy && ! $isExclude)
285 285
                     || (ExclusionPolicy::ALL === $exclusionPolicy && $isExpose)
286 286
                 ) {
287 287
                     $propertyMetadata->setAccessor($accessType, $accessor[0], $accessor[1]);
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 
303 303
         if (PHP_VERSION_ID >= 80000) {
304 304
             $annotations = array_map(
305
-                static function (\ReflectionAttribute $attribute): object {
305
+                static function(\ReflectionAttribute $attribute): object {
306 306
                     return $attribute->newInstance();
307 307
                 },
308 308
                 $class->getAttributes(SerializerAttribute::class, \ReflectionAttribute::IS_INSTANCEOF),
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 
326 326
         if (PHP_VERSION_ID >= 80000) {
327 327
             $annotations = array_map(
328
-                static function (\ReflectionAttribute $attribute): object {
328
+                static function(\ReflectionAttribute $attribute): object {
329 329
                     return $attribute->newInstance();
330 330
                 },
331 331
                 $method->getAttributes(SerializerAttribute::class, \ReflectionAttribute::IS_INSTANCEOF),
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 
349 349
         if (PHP_VERSION_ID >= 80000) {
350 350
             $annotations = array_map(
351
-                static function (\ReflectionAttribute $attribute): object {
351
+                static function(\ReflectionAttribute $attribute): object {
352 352
                     return $attribute->newInstance();
353 353
                 },
354 354
                 $property->getAttributes(SerializerAttribute::class, \ReflectionAttribute::IS_INSTANCEOF),
Please login to merge, or discard this patch.