Passed
Pull Request — master (#1526)
by
unknown
11:56
created
src/Metadata/Driver/AttributeDriver.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             )
Please login to merge, or discard this patch.
src/Metadata/Driver/AnnotationOrAttributeDriver.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,7 +336,7 @@  discard block
 block discarded – undo
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
                 $method->getAttributes()
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 
360 360
         if (PHP_VERSION_ID >= 80000) {
361 361
             $annotations = array_map(
362
-                static function (\ReflectionAttribute $attribute): object {
362
+                static function(\ReflectionAttribute $attribute): object {
363 363
                     return $attribute->newInstance();
364 364
                 },
365 365
                 $property->getAttributes()
Please login to merge, or discard this patch.