1 | <?php |
||
23 | class Fragment extends AbstractComponent implements FragmentInterface |
||
24 | { |
||
25 | /** |
||
26 | * @inheritdoc |
||
27 | */ |
||
28 | protected static $reservedCharactersRegex = "\!\$&'\(\)\*\+,;\=\:\/@\?"; |
||
29 | |||
30 | /** |
||
31 | * Preserve the delimiter |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $preserveDelimiter = false; |
||
36 | |||
37 | /** |
||
38 | * new instance |
||
39 | * |
||
40 | * @param string|null $data the component value |
||
41 | */ |
||
42 | 625 | public function __construct($data = null) |
|
49 | |||
50 | /** |
||
51 | * @inheritdoc |
||
52 | */ |
||
53 | 12 | public static function __set_state(array $properties) |
|
60 | |||
61 | /** |
||
62 | * @inheritdoc |
||
63 | */ |
||
64 | 2 | public function __debugInfo() |
|
68 | |||
69 | /** |
||
70 | * Returns the component literal value. The return type can be |
||
71 | * <ul> |
||
72 | * <li> null: If the component is not defined |
||
73 | * <li> string: Otherwise |
||
74 | * </ul> |
||
75 | * |
||
76 | * @return string|int|null |
||
77 | */ |
||
78 | 631 | public function getComponent() |
|
86 | |||
87 | /** |
||
88 | * Returns the instance string representation |
||
89 | * with its optional URI delimiters |
||
90 | * |
||
91 | * @return string |
||
92 | */ |
||
93 | 629 | public function getUriComponent() |
|
102 | |||
103 | /** |
||
104 | * Returns an instance with the specified string |
||
105 | * |
||
106 | * This method MUST retain the state of the current instance, and return |
||
107 | * an instance that contains the modified data |
||
108 | * |
||
109 | * @param string $value |
||
110 | * |
||
111 | * @return static |
||
112 | */ |
||
113 | 111 | public function modify($value) |
|
125 | } |
||
126 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.