Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | interface RouteInterface |
||
8 | { |
||
9 | |||
10 | /** |
||
11 | * instanciate |
||
12 | * |
||
13 | * @param string $routeItem |
||
14 | */ |
||
15 | public function __construct(string $routeItem); |
||
16 | |||
17 | /** |
||
18 | * return regexp pattern |
||
19 | * |
||
20 | * @return string |
||
21 | */ |
||
22 | public function getExpr(): string; |
||
23 | |||
24 | /** |
||
25 | * return required request method |
||
26 | * |
||
27 | * @return string |
||
28 | */ |
||
29 | public function getMethod(): string; |
||
30 | |||
31 | /** |
||
32 | * return slugs |
||
33 | * |
||
34 | * @return String[] |
||
35 | */ |
||
36 | public function getSlugs(): array; |
||
37 | } |
||
38 |
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.