@@ -20,19 +20,19 @@ |
||
20 | 20 | */ |
21 | 21 | abstract class Mailcode_Collection_Error |
22 | 22 | { |
23 | - /** |
|
24 | - * @var integer |
|
25 | - */ |
|
23 | + /** |
|
24 | + * @var integer |
|
25 | + */ |
|
26 | 26 | protected int $code = 0; |
27 | 27 | |
28 | - /** |
|
29 | - * @var string |
|
30 | - */ |
|
28 | + /** |
|
29 | + * @var string |
|
30 | + */ |
|
31 | 31 | protected string $matchedText = ''; |
32 | 32 | |
33 | - /** |
|
34 | - * @var string |
|
35 | - */ |
|
33 | + /** |
|
34 | + * @var string |
|
35 | + */ |
|
36 | 36 | protected string $message = ''; |
37 | 37 | |
38 | 38 | protected ?Mailcode_Commands_Command $command = null; |
@@ -51,14 +51,14 @@ discard block |
||
51 | 51 | Mailcode_Parser_Statement_Tokenizer_Process_SetNames::class, |
52 | 52 | ); |
53 | 53 | |
54 | - /** |
|
55 | - * @var Mailcode_Parser_Statement |
|
56 | - */ |
|
54 | + /** |
|
55 | + * @var Mailcode_Parser_Statement |
|
56 | + */ |
|
57 | 57 | protected Mailcode_Parser_Statement $statement; |
58 | 58 | |
59 | - /** |
|
60 | - * @var string |
|
61 | - */ |
|
59 | + /** |
|
60 | + * @var string |
|
61 | + */ |
|
62 | 62 | protected string $tokenized = ''; |
63 | 63 | |
64 | 64 | /** |
@@ -66,9 +66,9 @@ discard block |
||
66 | 66 | */ |
67 | 67 | protected array $tokensOrdered = array(); |
68 | 68 | |
69 | - /** |
|
70 | - * @var string[] |
|
71 | - */ |
|
69 | + /** |
|
70 | + * @var string[] |
|
71 | + */ |
|
72 | 72 | protected static array $ids = array(); |
73 | 73 | |
74 | 74 | /** |
@@ -91,12 +91,12 @@ discard block |
||
91 | 91 | return $this->statement->getSourceCommand(); |
92 | 92 | } |
93 | 93 | |
94 | - /** |
|
95 | - * Retrieves all tokens detected in the statement string, in |
|
96 | - * the order they were found. |
|
97 | - * |
|
98 | - * @return Mailcode_Parser_Statement_Tokenizer_Token[] |
|
99 | - */ |
|
94 | + /** |
|
95 | + * Retrieves all tokens detected in the statement string, in |
|
96 | + * the order they were found. |
|
97 | + * |
|
98 | + * @return Mailcode_Parser_Statement_Tokenizer_Token[] |
|
99 | + */ |
|
100 | 100 | public function getTokens() : array |
101 | 101 | { |
102 | 102 | return $this->tokensOrdered; |
@@ -107,11 +107,11 @@ discard block |
||
107 | 107 | return !empty($this->tokensOrdered); |
108 | 108 | } |
109 | 109 | |
110 | - /** |
|
111 | - * Whether there were any unknown tokens in the statement. |
|
112 | - * |
|
113 | - * @return bool |
|
114 | - */ |
|
110 | + /** |
|
111 | + * Whether there were any unknown tokens in the statement. |
|
112 | + * |
|
113 | + * @return bool |
|
114 | + */ |
|
115 | 115 | public function hasUnknown() : bool |
116 | 116 | { |
117 | 117 | $unknown = $this->getUnknown(); |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | return !empty($unknown); |
120 | 120 | } |
121 | 121 | |
122 | - /** |
|
123 | - * Retrieves all unknown content tokens, if any. |
|
124 | - * |
|
125 | - * @return Mailcode_Parser_Statement_Tokenizer_Token_Unknown[] |
|
126 | - */ |
|
122 | + /** |
|
123 | + * Retrieves all unknown content tokens, if any. |
|
124 | + * |
|
125 | + * @return Mailcode_Parser_Statement_Tokenizer_Token_Unknown[] |
|
126 | + */ |
|
127 | 127 | public function getUnknown() : array |
128 | 128 | { |
129 | 129 | $result = array(); |
@@ -410,13 +410,13 @@ discard block |
||
410 | 410 | return $this; |
411 | 411 | } |
412 | 412 | |
413 | - /** |
|
414 | - * Generates a unique alphabet-based ID without numbers |
|
415 | - * to use as token name, to avoid conflicts with the |
|
416 | - * numbers detection. |
|
417 | - * |
|
418 | - * @return string |
|
419 | - */ |
|
413 | + /** |
|
414 | + * Generates a unique alphabet-based ID without numbers |
|
415 | + * to use as token name, to avoid conflicts with the |
|
416 | + * numbers detection. |
|
417 | + * |
|
418 | + * @return string |
|
419 | + */ |
|
420 | 420 | protected function generateID() : string |
421 | 421 | { |
422 | 422 | static $alphas; |
@@ -35,11 +35,11 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
38 | - * Retrieves the text with the surrounding quotes, |
|
39 | - * and special characters escaped for Mailcode. |
|
40 | - * |
|
41 | - * @return string |
|
42 | - */ |
|
38 | + * Retrieves the text with the surrounding quotes, |
|
39 | + * and special characters escaped for Mailcode. |
|
40 | + * |
|
41 | + * @return string |
|
42 | + */ |
|
43 | 43 | public function getNormalized() : string |
44 | 44 | { |
45 | 45 | return '"'.SpecialChars::escape($this->text).'"'; |
@@ -50,21 +50,21 @@ discard block |
||
50 | 50 | return true; |
51 | 51 | } |
52 | 52 | |
53 | - /** |
|
54 | - * Retrieves the text with the surrounding quotes. |
|
55 | - * @return string |
|
56 | - */ |
|
53 | + /** |
|
54 | + * Retrieves the text with the surrounding quotes. |
|
55 | + * @return string |
|
56 | + */ |
|
57 | 57 | public function getValue() : string |
58 | 58 | { |
59 | 59 | return $this->getNormalized(); |
60 | 60 | } |
61 | 61 | |
62 | - /** |
|
63 | - * Retrieves the text without the surrounding quotes, |
|
64 | - * and special Mailcode characters not escaped. |
|
65 | - * |
|
66 | - * @return string |
|
67 | - */ |
|
62 | + /** |
|
63 | + * Retrieves the text without the surrounding quotes, |
|
64 | + * and special Mailcode characters not escaped. |
|
65 | + * |
|
66 | + * @return string |
|
67 | + */ |
|
68 | 68 | public function getText() : string |
69 | 69 | { |
70 | 70 | return SpecialChars::decode($this->text); |
@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | return true; |
36 | 36 | } |
37 | 37 | |
38 | - /** |
|
39 | - * Retrieves all known comparison operator signs. |
|
40 | - * @return string[] |
|
41 | - */ |
|
38 | + /** |
|
39 | + * Retrieves all known comparison operator signs. |
|
40 | + * @return string[] |
|
41 | + */ |
|
42 | 42 | public static function getComparisonSigns() : array |
43 | 43 | { |
44 | 44 | return array( |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | ); |
52 | 52 | } |
53 | 53 | |
54 | - /** |
|
55 | - * Retrieves all known arithmetic operator signs. |
|
56 | - * @return string[] |
|
57 | - */ |
|
54 | + /** |
|
55 | + * Retrieves all known arithmetic operator signs. |
|
56 | + * @return string[] |
|
57 | + */ |
|
58 | 58 | public static function getArithmeticSigns() : array |
59 | 59 | { |
60 | 60 | return array( |
@@ -65,11 +65,11 @@ discard block |
||
65 | 65 | ); |
66 | 66 | } |
67 | 67 | |
68 | - /** |
|
69 | - * Whether the operator is comparison related (equals, not equals, smaller, greater...). |
|
70 | - * |
|
71 | - * @return bool |
|
72 | - */ |
|
68 | + /** |
|
69 | + * Whether the operator is comparison related (equals, not equals, smaller, greater...). |
|
70 | + * |
|
71 | + * @return bool |
|
72 | + */ |
|
73 | 73 | public function isComparator() : bool |
74 | 74 | { |
75 | 75 | return |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | $this->isSmallerOrEquals(); |
82 | 82 | } |
83 | 83 | |
84 | - /** |
|
85 | - * Whether the operator is calculation related (minus, plus, divide, multiply). |
|
86 | - * |
|
87 | - * @return bool |
|
88 | - */ |
|
84 | + /** |
|
85 | + * Whether the operator is calculation related (minus, plus, divide, multiply). |
|
86 | + * |
|
87 | + * @return bool |
|
88 | + */ |
|
89 | 89 | public function isCalculator() : bool |
90 | 90 | { |
91 | 91 | return |