Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | interface RoutesInterface |
||
8 | { |
||
9 | /** |
||
10 | * instanciate |
||
11 | * |
||
12 | * @param array $routes |
||
13 | */ |
||
14 | public function __construct(array $routes); |
||
15 | |||
16 | /** |
||
17 | * get routes |
||
18 | * |
||
19 | * @return array |
||
20 | */ |
||
21 | public function get(): array; |
||
22 | |||
23 | /** |
||
24 | * set routes from array |
||
25 | * |
||
26 | * @param array $routes |
||
27 | * @return RoutesInterface |
||
28 | */ |
||
29 | public function set(array $routes): RoutesInterface; |
||
30 | } |
||
31 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@return
doc comment to communicate to implementors of these methods what they are expected to return.