| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public function handle(GenerateAPIDocsAction $action) |
||
| 46 | { |
||
| 47 | // TODO: add optional argument array, allowing user to specify a type or more otherwise take all |
||
| 48 | |||
| 49 | $types = [ |
||
| 50 | PrivateApi::TYPE, |
||
| 51 | PublicApi::TYPE, |
||
| 52 | ]; |
||
| 53 | |||
| 54 | echo "Generating API Documentations " . implode('& ', $types) . ".\n"; |
||
| 55 | |||
| 56 | foreach ($types as $type) { |
||
| 57 | $documentationUrls[] = "[ {your-domain}/{$action->run($type)} ]"; |
||
| 58 | } |
||
| 59 | |||
| 60 | echo "Done! You can access your API Docs at: " . implode(' & ', $documentationUrls) . ".\n"; |
||
| 61 | } |
||
| 62 | } |
||
| 63 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.