1 | <?php |
||
10 | class TypeProvider |
||
11 | { |
||
12 | /** |
||
13 | * @return array |
||
14 | */ |
||
15 | 5 | public function getTypes() |
|
23 | |||
24 | /** |
||
25 | * @param string $type |
||
26 | * |
||
27 | * @return string |
||
|
|||
28 | * @throws \Exception |
||
29 | */ |
||
30 | 2 | public function getTypeByName($type) |
|
44 | |||
45 | /** |
||
46 | * @param string $key |
||
47 | * |
||
48 | * @return string |
||
49 | * @throws \Exception |
||
50 | */ |
||
51 | 2 | public function getTypeByKey($key) |
|
63 | } |
||
64 |
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.