Completed
Push — master ( a6cc58...1b8eb5 )
by Martijn
26s
created
SwaggerGen/Swagger/Type/IntegerType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
             }
81 81
 
82 82
             $this->exclusiveMinimum = $match[2] == '<';
83
-            $this->minimum = $match[3] === '' ? null : (int)$match[3];
84
-            $this->maximum = $match[4] === '' ? null : (int)$match[4];
83
+            $this->minimum = $match[3] === '' ? null : (int) $match[3];
84
+            $this->maximum = $match[4] === '' ? null : (int) $match[4];
85 85
             $this->exclusiveMaximum = isset($match[5]) ? ($match[5] == '>') : null;
86 86
             if ($this->minimum && $this->maximum && $this->minimum > $this->maximum) {
87 87
                 self::swap($this->minimum, $this->maximum);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                 return $this;
126 126
 
127 127
             case 'step':
128
-                if (($step = (int)$data) > 0) {
128
+                if (($step = (int) $data) > 0) {
129 129
                     $this->multipleOf = $step;
130 130
                 }
131 131
                 return $this;
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
             }
175 175
         }
176 176
 
177
-        return (int)$value;
177
+        return (int) $value;
178 178
     }
179 179
 
180 180
 }
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
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
             }
105 105
 
106 106
             $exclusiveMinimum = $match[3] == '<';
107
-            $this->minItems = $match[4] === '' ? null : (int)$match[4];
108
-            $this->maxItems = $match[5] === '' ? null : (int)$match[5];
107
+            $this->minItems = $match[4] === '' ? null : (int) $match[4];
108
+            $this->maxItems = $match[5] === '' ? null : (int) $match[5];
109 109
             $exclusiveMaximum = isset($match[6]) ? ($match[6] == '>') : null;
110 110
             if ($this->minItems && $this->maxItems && $this->minItems > $this->maxItems) {
111 111
                 self::swap($this->minItems, $this->maxItems);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
         switch (strtolower($command)) {
141 141
             case 'min':
142
-                $this->minItems = (int)$data;
142
+                $this->minItems = (int) $data;
143 143
                 if ($this->minItems < 0) {
144 144
                     throw new Exception("Minimum less than zero: '{$data}'");
145 145
                 }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 return $this;
150 150
 
151 151
             case 'max':
152
-                $this->maxItems = (int)$data;
152
+                $this->maxItems = (int) $data;
153 153
                 if ($this->minItems !== null && $this->minItems > $this->maxItems) {
154 154
                     throw new Exception("Maximum less than minimum: '{$data}'");
155 155
                 }
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
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
             }
144 144
 
145 145
             $exclusiveMinimum = $match[3] == '<';
146
-            $this->minProperties = $match[4] === '' ? null : (int)$match[4];
147
-            $this->maxProperties = $match[5] === '' ? null : (int)$match[5];
146
+            $this->minProperties = $match[4] === '' ? null : (int) $match[4];
147
+            $this->maxProperties = $match[5] === '' ? null : (int) $match[5];
148 148
             $exclusiveMaximum = isset($match[6]) ? ($match[6] == '>') : null;
149 149
             if ($this->minProperties && $this->maxProperties && $this->minProperties > $this->maxProperties) {
150 150
                 self::swap($this->minProperties, $this->maxProperties);
@@ -250,18 +250,18 @@  discard block
 block discarded – undo
250 250
                 return $this;
251 251
 
252 252
             case 'min':
253
-                $this->minProperties = (int)$data;
253
+                $this->minProperties = (int) $data;
254 254
                 if ($this->minProperties < 0) {
255 255
                     throw new Exception("Minimum less than zero: '{$data}'");
256 256
                 }
257 257
                 if ($this->maxProperties !== null && $this->minProperties > $this->maxProperties) {
258 258
                     throw new Exception("Minimum greater than maximum: '{$data}'");
259 259
                 }
260
-                $this->minProperties = (int)$data;
260
+                $this->minProperties = (int) $data;
261 261
                 return $this;
262 262
 
263 263
             case 'max':
264
-                $this->maxProperties = (int)$data;
264
+                $this->maxProperties = (int) $data;
265 265
                 if ($this->minProperties !== null && $this->minProperties > $this->maxProperties) {
266 266
                     throw new Exception("Maximum less than minimum: '{$data}'");
267 267
                 }
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/AbstractType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
             if ($data === '') {
143 143
                 throw new Exception("Missing content for type example");
144 144
             }
145
-            $json = preg_replace_callback('/([^{}:,]+)/', static function ($match) {
145
+            $json = preg_replace_callback('/([^{}:,]+)/', static function($match) {
146 146
                 json_decode($match[1]);
147 147
                 return json_last_error() === JSON_ERROR_NONE ? $match[1] : json_encode($match[1]);
148 148
             }, trim($data));
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
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
             }
73 73
 
74 74
             $this->exclusiveMinimum = $match[2] == '<';
75
-            $this->minimum = $match[3] === '' ? null : (float)$match[3];
76
-            $this->maximum = $match[4] === '' ? null : (float)$match[4];
75
+            $this->minimum = $match[3] === '' ? null : (float) $match[3];
76
+            $this->maximum = $match[4] === '' ? null : (float) $match[4];
77 77
             $this->exclusiveMaximum = isset($match[5]) ? ($match[5] == '>') : null;
78 78
             if ($this->minimum && $this->maximum && $this->minimum > $this->maximum) {
79 79
                 self::swap($this->minimum, $this->maximum);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 return $this;
117 117
 
118 118
             case 'step':
119
-                if (($step = (float)$data) > 0) {
119
+                if (($step = (float) $data) > 0) {
120 120
                     $this->multipleOf = $step;
121 121
                 }
122 122
                 return $this;
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             }
166 166
         }
167 167
 
168
-        return (float)$value;
168
+        return (float) $value;
169 169
     }
170 170
 
171 171
 }
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Type/StringType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -156,8 +156,8 @@
 block discarded – undo
156 156
             'format' => empty($this->format) ? null : $this->format,
157 157
             'pattern' => $this->pattern,
158 158
             'default' => $this->default,
159
-            'minLength' => $this->minLength ? (int)$this->minLength : null,
160
-            'maxLength' => $this->maxLength ? (int)$this->maxLength : null,
159
+            'minLength' => $this->minLength ? (int) $this->minLength : null,
160
+            'maxLength' => $this->maxLength ? (int) $this->maxLength : null,
161 161
             'enum' => $this->enum,
162 162
         ), parent::toArray()));
163 163
     }
Please login to merge, or discard this patch.
SwaggerGen/Swagger/AbstractObject.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public static function arrayFilterNull($array): array
135 135
     {
136
-        return array_filter($array, static function ($value) {
136
+        return array_filter($array, static function($value) {
137 137
             return $value !== null && $value !== array();
138 138
         });
139 139
     }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public static function objectsToArray($array): array
147 147
     {
148
-        return array_map(static function (AbstractObject $item) {
148
+        return array_map(static function(AbstractObject $item) {
149 149
             return $item->toArray();
150 150
         }, $array);
151 151
     }
Please login to merge, or discard this patch.
SwaggerGen/Swagger/Response.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         static $lookup = null;
97 97
 
98 98
         if (is_numeric($search)) {
99
-            return (int)$search;
99
+            return (int) $search;
100 100
         }
101 101
 
102 102
         // build static lookup table
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
                 if ($data === '') {
164 164
                     throw new Exception('Missing content for example `' . $name . '`');
165 165
                 }
166
-                $json = preg_replace_callback('/([^{}:]+)/', static function ($match) {
166
+                $json = preg_replace_callback('/([^{}:]+)/', static function($match) {
167 167
                     json_decode($match[1]);
168 168
                     return json_last_error() === JSON_ERROR_NONE ? $match[1] : json_encode($match[1]);
169 169
                 }, trim($data));
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) - array_search($b, $methods);
87 87
         });
88 88
 
Please login to merge, or discard this patch.