1 | <?php |
||
11 | class Api extends Controller |
||
12 | { |
||
13 | const DOMAIN = 'ROOT'; |
||
14 | const PSFS_DOC = 'psfs'; |
||
15 | const SWAGGER_DOC = 'swagger'; |
||
16 | const POSTMAN_DOC = 'postman'; |
||
17 | const HTML_DOC = 'html'; |
||
18 | |||
19 | /** |
||
20 | * @Inyectable |
||
21 | * @var \PSFS\services\DocumentorService $srv |
||
22 | */ |
||
23 | protected $srv; |
||
24 | |||
25 | /** |
||
26 | * @GET |
||
27 | * @route /api/__doc/{type} |
||
28 | * |
||
29 | * @param string $type |
||
30 | * |
||
31 | * @return string JSON |
||
|
|||
32 | */ |
||
33 | public function createApiDocs($type = Api::PSFS_DOC) |
||
62 | } |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.