Total Complexity | 3 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class IntParameter extends Parameter { |
||
10 | |||
11 | protected static $name = 'int'; |
||
12 | |||
13 | |||
14 | public function __construct(string $extra) { |
||
16 | } |
||
17 | |||
18 | public function getValue(string $matched) { |
||
19 | return intval($matched); |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * 获取匹配字符串 |
||
24 | * |
||
25 | * @return string |
||
26 | */ |
||
27 | function getMatch():string { |
||
29 | } |
||
30 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.