| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function createApiDocs($type = 'swagger') |
||
| 29 | { |
||
| 30 | $doc = $endpoints = []; |
||
| 31 | $modules = $this->srv->getModules(); |
||
| 32 | if (count($modules)) { |
||
| 33 | foreach ($modules as $module) { |
||
| 34 | $endpoints = array_merge($doc, $this->srv->extractApiEndpoints($module)); |
||
| 35 | } |
||
| 36 | } |
||
| 37 | |||
| 38 | return $this->json($endpoints, 200); |
||
| 39 | } |
||
| 40 | } |
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.