@@ 9-16 (lines=8) @@ | ||
6 | { |
|
7 | use XMLStringTrait; |
|
8 | ||
9 | public function normaliseString($input) |
|
10 | { |
|
11 | if (!is_string($input) || !is_numeric($input)) { |
|
12 | throw new \InvalidArgumentException("Input must be a string"); |
|
13 | } |
|
14 | $result = $this->replaceString($input); |
|
15 | return $result; |
|
16 | } |
|
17 | ||
18 | public function token($input) |
|
19 | { |
|
@@ 18-25 (lines=8) @@ | ||
15 | return $result; |
|
16 | } |
|
17 | ||
18 | public function token($input) |
|
19 | { |
|
20 | if (!is_string($input) || !is_numeric($input)) { |
|
21 | throw new \InvalidArgumentException("Input must be a string"); |
|
22 | } |
|
23 | $result = $this->collapseString($input); |
|
24 | return $result; |
|
25 | } |
|
26 | ||
27 | public function string($input) |
|
28 | { |
|
@@ 27-34 (lines=8) @@ | ||
24 | return $result; |
|
25 | } |
|
26 | ||
27 | public function string($input) |
|
28 | { |
|
29 | if (!is_string($input) || !is_numeric($input)) { |
|
30 | throw new \InvalidArgumentException("Input must be a string"); |
|
31 | } |
|
32 | $result = $this->preserveString($input); |
|
33 | return $result; |
|
34 | } |
|
35 | ||
36 | public function integer($input) |
|
37 | { |