Passed
Pull Request — master (#1448)
by Asmir
02:29
created
src/Metadata/Driver/EnumPropertiesDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
     {
75 75
         $reflectionType = $propertyReflection->getType();
76 76
 
77
-        if (!($reflectionType instanceof \ReflectionNamedType)) {
77
+        if ( ! ($reflectionType instanceof \ReflectionNamedType)) {
78 78
             return null;
79 79
         }
80 80
 
Please login to merge, or discard this patch.
src/Handler/EnumHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         SerializationContext $context
45 45
     ) {
46 46
         if (isset($type['params'][1]) && 'value' === $type['params'][1]) {
47
-            if (!$enum instanceof \BackedEnum) {
47
+            if ( ! $enum instanceof \BackedEnum) {
48 48
                 throw new InvalidMetadataException(sprintf('The type "%s" is not a backed enum, thus you can not use "value" as serialization mode for its value.', get_class($enum)));
49 49
             }
50 50
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         if (isset($type['params'][1]) && 'value' === $type['params'][1]) {
68 68
             $backingType = $ref->getBackingType();
69 69
 
70
-            if (!$backingType instanceof \ReflectionNamedType) {
70
+            if ( ! $backingType instanceof \ReflectionNamedType) {
71 71
                 throw new InvalidMetadataException(sprintf('The type "%s" is not a backed enum, thus you can not use "value" as serialization mode for its value.', $ref->getName()));
72 72
             }
73 73
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             return null;
91 91
         } else {
92 92
             $caseValue = (string) $data;
93
-            if (!$ref->hasCase($caseValue)) {
93
+            if ( ! $ref->hasCase($caseValue)) {
94 94
                 throw new InvalidMetadataException(sprintf('The type "%s" does not have the case "%s"', $ref->getName(), $caseValue));
95 95
             }
96 96
 
Please login to merge, or discard this patch.