Completed
Push — master ( a6cc58...1b8eb5 )
by Martijn
26s
created
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.
SwaggerGen/Swagger/Parameter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
         $this->name = $name;
97 97
 
98 98
         $this->description = $data;
99
-        $this->required = (bool)$required;
99
+        $this->required = (bool) $required;
100 100
 
101 101
         // Parse regex
102 102
         $match = array();
Please login to merge, or discard this patch.
SwaggerGen/SwaggerGen.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                         if ($result !== $top) {
158 158
                             // Remove all similar classes from array first!
159 159
                             $classname = get_class($result);
160
-                            $stack = array_filter($stack, static function ($class) use ($classname) {
160
+                            $stack = array_filter($stack, static function($class) use ($classname) {
161 161
                                 return !(is_a($class, $classname));
162 162
                             });
163 163
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
                 $stacktrace = [];
178 178
                 foreach ($stack as $object) {
179
-                    $stacktrace[] = (string)$object;
179
+                    $stacktrace[] = (string) $object;
180 180
                 }
181 181
                 $messages[] = implode(', ' . PHP_EOL, $stacktrace);
182 182
 
@@ -237,9 +237,9 @@  discard block
 block discarded – undo
237 237
                 if (!function_exists('yaml_emit')) {
238 238
                     throw new Exception('YAML extension not installed.');
239 239
                 }
240
-                array_walk_recursive($output, static function (&$value) {
240
+                array_walk_recursive($output, static function(&$value) {
241 241
                     if (is_object($value)) {
242
-                        $value = (array)$value;
242
+                        $value = (array) $value;
243 243
                     }
244 244
                 });
245 245
                 $output = yaml_emit($output, YAML_UTF8_ENCODING, YAML_LN_BREAK);
Please login to merge, or discard this patch.