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