Passed
Pull Request — master (#1546)
by
unknown
02:44
created
src/Builder/DefaultDriverFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     public function createDriver(array $metadataDirs, ?Reader $annotationReader = null): DriverInterface
60 60
     {
61
-        if (PHP_VERSION_ID < 80000 && empty($metadataDirs) && !interface_exists(Reader::class)) {
61
+        if (PHP_VERSION_ID < 80000 && empty($metadataDirs) && ! interface_exists(Reader::class)) {
62 62
             throw new RuntimeException(sprintf('To use "%s", either a list of metadata directories must be provided, the "doctrine/annotations" package installed, or use PHP 8.0 or later.', self::class));
63 63
         }
64 64
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             $metadataDrivers[] = new AnnotationOrAttributeDriver($this->propertyNamingStrategy, $this->typeParser, $this->expressionEvaluator, $annotationReader);
77 77
         }
78 78
 
79
-        if (!empty($metadataDirs)) {
79
+        if ( ! empty($metadataDirs)) {
80 80
             $fileLocator = new FileLocator($metadataDirs);
81 81
 
82 82
             array_unshift($metadataDrivers, new XmlDriver($fileLocator, $this->propertyNamingStrategy, $this->typeParser, $this->expressionEvaluator));
Please login to merge, or discard this patch.
src/Builder/CallbackDriverFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     public function createDriver(array $metadataDirs, ?Reader $reader = null): DriverInterface
28 28
     {
29 29
         $driver = \call_user_func($this->callback, $metadataDirs, $reader);
30
-        if (!$driver instanceof DriverInterface) {
30
+        if ( ! $driver instanceof DriverInterface) {
31 31
             throw new LogicException('The callback must return an instance of DriverInterface.');
32 32
         }
33 33
 
Please login to merge, or discard this patch.
src/Context.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             $this->addExclusionStrategy(new VersionExclusionStrategy($this->attributes['version']));
79 79
         }
80 80
 
81
-        if (!empty($this->attributes['max_depth_checks'])) {
81
+        if ( ! empty($this->attributes['max_depth_checks'])) {
82 82
             $this->addExclusionStrategy(new DepthExclusionStrategy());
83 83
         }
84 84
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
     final protected function assertMutable(): void
135 135
     {
136
-        if (!$this->initialized) {
136
+        if ( ! $this->initialized) {
137 137
             return;
138 138
         }
139 139
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     {
223 223
         $metadata = $this->metadataStack->pop();
224 224
 
225
-        if (!$metadata instanceof PropertyMetadata) {
225
+        if ( ! $metadata instanceof PropertyMetadata) {
226 226
             throw new RuntimeException('Context metadataStack not working well');
227 227
         }
228 228
     }
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
     {
232 232
         $metadata = $this->metadataStack->pop();
233 233
 
234
-        if (!$metadata instanceof ClassMetadata) {
234
+        if ( ! $metadata instanceof ClassMetadata) {
235 235
             throw new RuntimeException('Context metadataStack not working well');
236 236
         }
237 237
     }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
     public function getCurrentPath(): array
245 245
     {
246
-        if (!$this->metadataStack) {
246
+        if ( ! $this->metadataStack) {
247 247
             return [];
248 248
         }
249 249
 
Please login to merge, or discard this patch.
src/Metadata/Driver/TypedPropertiesDriver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     private function shouldTypeHint(?ReflectionType $reflectionType): bool
131 131
     {
132
-        if (!$reflectionType instanceof ReflectionNamedType) {
132
+        if ( ! $reflectionType instanceof ReflectionNamedType) {
133 133
             return false;
134 134
         }
135 135
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      */
147 147
     private function shouldTypeHintUnion(?ReflectionType $reflectionType)
148 148
     {
149
-        if (!$reflectionType instanceof \ReflectionUnionType) {
149
+        if ( ! $reflectionType instanceof \ReflectionUnionType) {
150 150
             return false;
151 151
         }
152 152
 
Please login to merge, or discard this patch.
src/Handler/UnionHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
     private function reorderTypes(array $type): array
94 94
     {
95 95
         if ($type['params']) {
96
-            uasort($type['params'], static function ($a, $b) {
96
+            uasort($type['params'], static function($a, $b) {
97 97
                 $order = ['null' => 0, 'true' => 1, 'false' => 2, 'bool' => 3, 'int' => 4, 'float' => 5, 'string' => 6];
98 98
 
99 99
                 return (array_key_exists($a['name'], $order) ? $order[$a['name']] : 7) <=> (array_key_exists($b['name'], $order) ? $order[$b['name']] : 7);
Please login to merge, or discard this patch.