Total Complexity | 7 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | class Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral extends Mailcode_Parser_Statement_Tokenizer_Token implements Mailcode_Parser_Statement_Tokenizer_ValueInterface |
||
24 | { |
||
25 | private string $text; |
||
26 | |||
27 | protected function init() : void |
||
30 | } |
||
31 | |||
32 | private function stripQuotes(string $text) : string |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Retrieves the text with the surrounding quotes, |
||
39 | * and special characters escaped for Mailcode. |
||
40 | * |
||
41 | * @return string |
||
42 | */ |
||
43 | public function getNormalized() : string |
||
46 | } |
||
47 | |||
48 | public function hasSpacing(): bool |
||
49 | { |
||
50 | return true; |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * Retrieves the text with the surrounding quotes. |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getValue() : string |
||
58 | { |
||
59 | return $this->getNormalized(); |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * Retrieves the text without the surrounding quotes, |
||
64 | * and special Mailcode characters not escaped. |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | public function getText() : string |
||
69 | { |
||
70 | return SpecialChars::decode($this->text); |
||
71 | } |
||
72 | |||
73 | public function setText(string $text) : self |
||
79 | } |
||
80 | } |
||
81 |