Completed
Push — master ( ba73f2...e6d5b5 )
by Martijn
27s
created
SwaggerGen/Parser/Php/Entity/ParserFunction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
  */
16 16
 class ParserFunction extends AbstractEntity
17 17
 {
18
-    public string|null $name = null;
18
+    public string | null $name = null;
19 19
 
20 20
     public function __construct(Parser $Parser, &$tokens, array $statements = null)
21 21
     {
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Path.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
     public function toArray(): array
83 83
     {
84 84
         $methods = self::$methods;
85
-        uksort($this->operations, static function ($a, $b) use ($methods) {
85
+        uksort($this->operations, static function($a, $b) use ($methods) {
86 86
             return array_search($a, $methods, true) - array_search($b, $methods, true);
87 87
         });
88 88
 
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/ObjectType.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -120,18 +120,18 @@  discard block
 block discarded – undo
120 120
                 return $this;
121 121
 
122 122
             case 'min':
123
-                $this->minProperties = (int)$data;
123
+                $this->minProperties = (int) $data;
124 124
                 if ($this->minProperties < 0) {
125 125
                     throw new Exception("Minimum less than zero: '{$data}'");
126 126
                 }
127 127
                 if ($this->maxProperties !== null && $this->minProperties > $this->maxProperties) {
128 128
                     throw new Exception("Minimum greater than maximum: '{$data}'");
129 129
                 }
130
-                $this->minProperties = (int)$data;
130
+                $this->minProperties = (int) $data;
131 131
                 return $this;
132 132
 
133 133
             case 'max':
134
-                $this->maxProperties = (int)$data;
134
+                $this->maxProperties = (int) $data;
135 135
                 if ($this->minProperties !== null && $this->minProperties > $this->maxProperties) {
136 136
                     throw new Exception("Maximum less than minimum: '{$data}'");
137 137
                 }
@@ -285,8 +285,8 @@  discard block
 block discarded – undo
285 285
             }
286 286
 
287 287
             $exclusiveMinimum = $match[3] === '<';
288
-            $this->minProperties = $match[4] === '' ? null : (int)$match[4];
289
-            $this->maxProperties = $match[5] === '' ? null : (int)$match[5];
288
+            $this->minProperties = $match[4] === '' ? null : (int) $match[4];
289
+            $this->maxProperties = $match[5] === '' ? null : (int) $match[5];
290 290
             $exclusiveMaximum = isset($match[6]) ? ($match[6] === '>') : null;
291 291
             if ($this->minProperties && $this->maxProperties && $this->minProperties > $this->maxProperties) {
292 292
                 self::swap($this->minProperties, $this->maxProperties);
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/FileType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
             $consumes = $this->getSwagger()->getConsumes();
53 53
         }
54 54
 
55
-        $valid_consumes = ((int)in_array('multipart/form-data', $consumes, true)) + ((int)in_array('application/x-www-form-urlencoded', $consumes, true));
55
+        $valid_consumes = ((int) in_array('multipart/form-data', $consumes, true)) + ((int) in_array('application/x-www-form-urlencoded', $consumes, true));
56 56
         if (empty($consumes) || $valid_consumes !== count($consumes)) {
57 57
             throw new Exception("File type '{$definition}' without valid consume");
58 58
         }
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/IntegerType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                 return $this;
62 62
 
63 63
             case 'step':
64
-                if (($step = (int)$data) > 0) {
64
+                if (($step = (int) $data) > 0) {
65 65
                     $this->multipleOf = $step;
66 66
                 }
67 67
                 return $this;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             }
91 91
         }
92 92
 
93
-        return (int)$value;
93
+        return (int) $value;
94 94
     }
95 95
 
96 96
     public function toArray(): array
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
             }
158 158
 
159 159
             $this->exclusiveMinimum = $match[2] === '<';
160
-            $this->minimum = $match[3] === '' ? null : (int)$match[3];
161
-            $this->maximum = $match[4] === '' ? null : (int)$match[4];
160
+            $this->minimum = $match[3] === '' ? null : (int) $match[3];
161
+            $this->maximum = $match[4] === '' ? null : (int) $match[4];
162 162
             $this->exclusiveMaximum = isset($match[5]) ? ($match[5] === '>') : null;
163 163
             if ($this->minimum && $this->maximum && $this->minimum > $this->maximum) {
164 164
                 self::swap($this->minimum, $this->maximum);
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/NumberType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                 return $this;
59 59
 
60 60
             case 'step':
61
-                if (($step = (float)$data) > 0) {
61
+                if (($step = (float) $data) > 0) {
62 62
                     $this->multipleOf = $step;
63 63
                 }
64 64
                 return $this;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             }
88 88
         }
89 89
 
90
-        return (float)$value;
90
+        return (float) $value;
91 91
     }
92 92
 
93 93
     public function toArray(): array
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
             }
150 150
 
151 151
             $this->exclusiveMinimum = $match[2] === '<';
152
-            $this->minimum = $match[3] === '' ? null : (float)$match[3];
153
-            $this->maximum = $match[4] === '' ? null : (float)$match[4];
152
+            $this->minimum = $match[3] === '' ? null : (float) $match[3];
153
+            $this->maximum = $match[4] === '' ? null : (float) $match[4];
154 154
             $this->exclusiveMaximum = isset($match[5]) ? ($match[5] === '>') : null;
155 155
             if ($this->minimum && $this->maximum && $this->minimum > $this->maximum) {
156 156
                 self::swap($this->minimum, $this->maximum);
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/ArrayType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
         switch (strtolower($command)) {
61 61
             case 'min':
62
-                $this->minItems = (int)$data;
62
+                $this->minItems = (int) $data;
63 63
                 if ($this->minItems < 0) {
64 64
                     throw new Exception("Minimum less than zero: '$data'");
65 65
                 }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                 return $this;
70 70
 
71 71
             case 'max':
72
-                $this->maxItems = (int)$data;
72
+                $this->maxItems = (int) $data;
73 73
                 if ($this->minItems !== null && $this->minItems > $this->maxItems) {
74 74
                     throw new Exception("Maximum less than minimum: '$data'");
75 75
                 }
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
             }
183 183
 
184 184
             $exclusiveMinimum = $match[3] === '<';
185
-            $this->minItems = $match[4] === '' ? null : (int)$match[4];
186
-            $this->maxItems = $match[5] === '' ? null : (int)$match[5];
185
+            $this->minItems = $match[4] === '' ? null : (int) $match[4];
186
+            $this->maxItems = $match[5] === '' ? null : (int) $match[5];
187 187
             $exclusiveMaximum = isset($match[6]) ? ($match[6] === '>') : null;
188 188
             if ($this->minItems && $this->maxItems && $this->minItems > $this->maxItems) {
189 189
                 self::swap($this->minItems, $this->maxItems);
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Info.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
             'termsOfService' => $this->termsofservice,
108 108
             'contact' => $this->contact?->toArray(),
109 109
             'license' => $this->license?->toArray(),
110
-            'version' => (string)$this->version,
110
+            'version' => (string) $this->version,
111 111
         ), parent::toArray()));
112 112
     }
113 113
 
Please login to merge, or discard this patch.