Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | 2 | public static function fromString(string $parameter): self |
|
33 | { |
||
34 | 2 | $regEx = '{^' . Rfc6266::DISPOSITION_PARM_EXTENDED . '$}'; |
|
35 | 2 | if (preg_match($regEx, $parameter) === 1) { |
|
36 | 1 | return ExtendedParameter::fromString($parameter); |
|
37 | } |
||
38 | |||
39 | 1 | return RegularParameter::fromString($parameter); |
|
40 | } |
||
73 |