@@ -8,7 +8,6 @@ discard block |
||
8 | 8 | use PhpBoot\Docgen\Swagger\Schemas\ArraySchemaObject; |
9 | 9 | use PhpBoot\Docgen\Swagger\Schemas\BodyParameterObject; |
10 | 10 | use PhpBoot\Docgen\Swagger\Schemas\OperationObject; |
11 | -use PhpBoot\Docgen\Swagger\Schemas\OtherParameterObject; |
|
12 | 11 | use PhpBoot\Docgen\Swagger\Schemas\PrimitiveSchemaObject; |
13 | 12 | use PhpBoot\Docgen\Swagger\Schemas\RefSchemaObject; |
14 | 13 | use PhpBoot\Docgen\Swagger\Schemas\ResponseObject; |
@@ -22,8 +21,6 @@ discard block |
||
22 | 21 | use PhpBoot\Metas\ParamMeta; |
23 | 22 | use PhpBoot\Metas\ReturnMeta; |
24 | 23 | use PhpBoot\Utils\ArrayHelper; |
25 | -use PhpBoot\Validator\Validator; |
|
26 | -use Symfony\Component\HttpKernel\Exception\HttpException; |
|
27 | 24 | |
28 | 25 | class Swagger extends SwaggerObject |
29 | 26 | { |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $ins = null; |
139 | 139 | try{ |
140 | 140 | $ins = $app->make($name); |
141 | - }catch (\Exception $e){ |
|
141 | + } catch (\Exception $e){ |
|
142 | 142 | |
143 | 143 | } |
144 | 144 | |
@@ -219,9 +219,9 @@ discard block |
||
219 | 219 | { |
220 | 220 | if ($content instanceof ReturnMeta || $content instanceof ParamMeta) { |
221 | 221 | return $this->makeExample($content->container); |
222 | - }elseif ($content instanceof TypeContainerInterface){ |
|
222 | + } elseif ($content instanceof TypeContainerInterface){ |
|
223 | 223 | return $content->makeExample(); |
224 | - }elseif(is_array($content)) { |
|
224 | + } elseif(is_array($content)) { |
|
225 | 225 | $res = []; |
226 | 226 | foreach ($content as $k => $v) { |
227 | 227 | $res[$k] = $this->makeExample($v); |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | $paramSchema = new PrimitiveSchemaObject(); |
377 | 377 | if($isFile){ |
378 | 378 | $paramSchema->type = 'file'; |
379 | - }else{ |
|
379 | + } else{ |
|
380 | 380 | $paramSchema->type = self::mapType($param->type); |
381 | 381 | self::mapValidation($param->validation, $paramSchema); |
382 | 382 | } |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | } elseif($container == null){ |
435 | 435 | $schema = null ;//new PrimitiveSchemaObject(); |
436 | 436 | //$schema->type = null; |
437 | - }else { |
|
437 | + } else { |
|
438 | 438 | $schema = new PrimitiveSchemaObject(); |
439 | 439 | //$schema->type = 'mixed'; |
440 | 440 | } |