Total Complexity | 5 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
31 | final class Scheme implements ComponentInterface |
||
32 | { |
||
33 | |||
34 | /** |
||
35 | * Regular expression to validate the component value |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | private const VALIDATE_REGEX = '/^(?:[A-Za-z][0-9A-Za-z\+\-\.]*)?$/'; |
||
40 | |||
41 | /** |
||
42 | * The component value |
||
43 | * |
||
44 | * @var string |
||
45 | */ |
||
46 | private string $value = ''; |
||
47 | |||
48 | /** |
||
49 | * Constructor of the class |
||
50 | * |
||
51 | * @param mixed $value |
||
52 | * |
||
53 | * @throws InvalidUriComponentException |
||
54 | * If the component isn't valid. |
||
55 | */ |
||
56 | 117 | public function __construct($value) |
|
72 | } |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | 104 | public function getValue(): string |
|
84 |