Total Complexity | 3 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
24 | class StringParameter extends Parameter |
||
25 | { |
||
26 | |||
27 | // |
||
28 | // STATIC FUNCTIONS |
||
29 | // |
||
30 | |||
31 | // |
||
32 | // PUBLIC FUNCTIONS |
||
33 | // |
||
34 | |||
35 | /** |
||
36 | * Returns ARGH_TYPE_STRING |
||
37 | * |
||
38 | * @since 1.0.0 |
||
39 | * |
||
40 | * @return int |
||
41 | */ |
||
42 | public function getParameterType(): int |
||
43 | { |
||
44 | return Parameter::ARGH_TYPE_STRING; |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Sets the string value of this Parameter. |
||
49 | * |
||
50 | * Casts all values to string. |
||
51 | * |
||
52 | * @since 1.0.0 |
||
53 | * |
||
54 | * @param mixed $value |
||
55 | * |
||
56 | * @throws ArghExpception If $value is an array. |
||
57 | */ |
||
58 | public function setValue($value) |
||
66 | } |
||
67 | |||
70 | ?> |
||
|
Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.
A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.