Completed
Pull Request — master (#51)
by
unknown
20s
created
SwaggerGen/SwaggerGen.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                         if ($result !== $top) {
161 161
                             // Remove all similar classes from array first!
162 162
                             $classname = get_class($result);
163
-                            $stack = array_filter($stack, function ($class) use ($classname) {
163
+                            $stack = array_filter($stack, function($class) use ($classname) {
164 164
                                 return !(is_a($class, $classname));
165 165
                             });
166 166
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 
180 180
                 $stacktrace = [];
181 181
                 foreach ($stack as $object) {
182
-                    $stacktrace[] = (string)$object;
182
+                    $stacktrace[] = (string) $object;
183 183
                 }
184 184
                 $messages[] = join(', ' . PHP_EOL, $stacktrace);
185 185
 
@@ -239,9 +239,9 @@  discard block
 block discarded – undo
239 239
                 if (!function_exists('yaml_emit')) {
240 240
                     throw new Exception('YAML extension not installed.');
241 241
                 }
242
-                array_walk_recursive($output, function (&$value) {
242
+                array_walk_recursive($output, function(&$value) {
243 243
                     if (is_object($value)) {
244
-                        $value = (array)$value;
244
+                        $value = (array) $value;
245 245
                     }
246 246
                 });
247 247
                 $output = yaml_emit($output, YAML_UTF8_ENCODING, YAML_LN_BREAK);
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
         }
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/Swagger/Response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
                 if ($data === '') {
164 164
                     throw new Exception('Missing content for example `' . $name . '`');
165 165
                 }
166
-                $json = preg_replace_callback('/([^{}:]+)/', function ($match) {
166
+                $json = preg_replace_callback('/([^{}:]+)/', 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()
83 83
     {
84 84
         $methods = self::$methods;
85
-        uksort($this->operations, function ($a, $b) use ($methods) {
85
+        uksort($this->operations, 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/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)
135 135
     {
136
-        return array_filter($array, function ($value) {
136
+        return array_filter($array, 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)
147 147
     {
148
-        return array_map(function (AbstractObject $item) {
148
+        return array_map(function(AbstractObject $item) {
149 149
             return $item->toArray();
150 150
         }, $array);
151 151
     }
Please login to merge, or discard this patch.
SwaggerGen/Swagger/BodyParameter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         }
46 46
 
47 47
         $this->description = $data;
48
-        $this->required = (bool)$required;
48
+        $this->required = (bool) $required;
49 49
 
50 50
         $this->schema = new Schema($this, $type);
51 51
     }
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
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             $consumes = $this->getSwagger()->getConsumes();
41 41
         }
42 42
 
43
-        $valid_consumes = ((int)in_array('multipart/form-data', $consumes)) + ((int)in_array('application/x-www-form-urlencoded', $consumes));
43
+        $valid_consumes = ((int) in_array('multipart/form-data', $consumes)) + ((int) in_array('application/x-www-form-urlencoded', $consumes));
44 44
         if (empty($consumes) || $valid_consumes !== count($consumes)) {
45 45
             throw new Exception("File type '{$definition}' without valid consume");
46 46
         }
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('/([^{}:,]+)/', function ($match) {
145
+            $json = preg_replace_callback('/([^{}:,]+)/', 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/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 ? $this->contact->toArray() : null,
109 109
             'license' => $this->license ? $this->license->toArray() : null,
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.