Total Complexity | 3 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class StringParameter extends Parameter { |
||
10 | |||
11 | protected static $name = 'string'; |
||
12 | |||
13 | public function __construct(string $extra) { |
||
14 | $this->default = $this->getCommonDefault($extra); |
||
15 | } |
||
16 | |||
17 | public function getValue(string $matched) { |
||
18 | return urldecode($matched); |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * 获取匹配字符串 |
||
23 | * |
||
24 | * @return string |
||
25 | */ |
||
26 | function getMatch():string { |
||
28 | } |
||
29 | } |
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.