@@ -26,14 +26,14 @@ |
||
26 | 26 | */ |
27 | 27 | trait Mailcode_Traits_Commands_Validation_CaseSensitive |
28 | 28 | { |
29 | - /** |
|
30 | - * @var boolean |
|
31 | - */ |
|
29 | + /** |
|
30 | + * @var boolean |
|
31 | + */ |
|
32 | 32 | protected $caseInsensitive = false; |
33 | 33 | |
34 | - /** |
|
35 | - * @var Mailcode_Parser_Statement_Tokenizer_Token_Keyword|NULL |
|
36 | - */ |
|
34 | + /** |
|
35 | + * @var Mailcode_Parser_Statement_Tokenizer_Token_Keyword|NULL |
|
36 | + */ |
|
37 | 37 | protected $regexToken; |
38 | 38 | |
39 | 39 | protected function validateSyntax_case_sensitive() : void |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | */ |
29 | 29 | class Mailcode_Parser_Statement_Validator |
30 | 30 | { |
31 | - /** |
|
32 | - * @var Mailcode_Parser_Statement |
|
33 | - */ |
|
31 | + /** |
|
32 | + * @var Mailcode_Parser_Statement |
|
33 | + */ |
|
34 | 34 | private $statement; |
35 | 35 | |
36 | 36 | public function __construct(Mailcode_Parser_Statement $statement) |
@@ -38,24 +38,24 @@ discard block |
||
38 | 38 | $this->statement = $statement; |
39 | 39 | } |
40 | 40 | |
41 | - /** |
|
42 | - * Creates a variable validator: checks whether a single |
|
43 | - * variable token is present in the parameters. |
|
44 | - * |
|
45 | - * @return Mailcode_Parser_Statement_Validator_Type_Variable |
|
46 | - */ |
|
41 | + /** |
|
42 | + * Creates a variable validator: checks whether a single |
|
43 | + * variable token is present in the parameters. |
|
44 | + * |
|
45 | + * @return Mailcode_Parser_Statement_Validator_Type_Variable |
|
46 | + */ |
|
47 | 47 | public function createVariable() : Mailcode_Parser_Statement_Validator_Type_Variable |
48 | 48 | { |
49 | 49 | return new Mailcode_Parser_Statement_Validator_Type_Variable($this->statement); |
50 | 50 | } |
51 | 51 | |
52 | - /** |
|
53 | - * Creates a keyword validator: checks whether a single |
|
54 | - * keyword token is present in the parameters. |
|
55 | - * |
|
56 | - * @param string $keywordName |
|
57 | - * @return Mailcode_Parser_Statement_Validator_Type_Keyword |
|
58 | - */ |
|
52 | + /** |
|
53 | + * Creates a keyword validator: checks whether a single |
|
54 | + * keyword token is present in the parameters. |
|
55 | + * |
|
56 | + * @param string $keywordName |
|
57 | + * @return Mailcode_Parser_Statement_Validator_Type_Keyword |
|
58 | + */ |
|
59 | 59 | public function createKeyword(string $keywordName) : Mailcode_Parser_Statement_Validator_Type_Keyword |
60 | 60 | { |
61 | 61 | return new Mailcode_Parser_Statement_Validator_Type_Keyword( |
@@ -26,14 +26,14 @@ |
||
26 | 26 | */ |
27 | 27 | trait Mailcode_Traits_Commands_Validation_Multiline |
28 | 28 | { |
29 | - /** |
|
30 | - * @var boolean |
|
31 | - */ |
|
29 | + /** |
|
30 | + * @var boolean |
|
31 | + */ |
|
32 | 32 | protected $multiline = false; |
33 | 33 | |
34 | - /** |
|
35 | - * @var Mailcode_Parser_Statement_Tokenizer_Token_Keyword|NULL |
|
36 | - */ |
|
34 | + /** |
|
35 | + * @var Mailcode_Parser_Statement_Tokenizer_Token_Keyword|NULL |
|
36 | + */ |
|
37 | 37 | protected $multilineToken; |
38 | 38 | |
39 | 39 | protected function validateSyntax_multiline() : void |
@@ -20,9 +20,9 @@ |
||
20 | 20 | */ |
21 | 21 | abstract class Mailcode_Factory_CommandSets_Set |
22 | 22 | { |
23 | - /** |
|
24 | - * @var Mailcode_Factory_Instantiator |
|
25 | - */ |
|
23 | + /** |
|
24 | + * @var Mailcode_Factory_Instantiator |
|
25 | + */ |
|
26 | 26 | protected $instantiator; |
27 | 27 | |
28 | 28 | /** |
@@ -20,15 +20,15 @@ discard block |
||
20 | 20 | */ |
21 | 21 | class Mailcode_Commands_Command_ShowDate extends Mailcode_Commands_ShowBase |
22 | 22 | { |
23 | - /** |
|
24 | - * The date format string. |
|
25 | - * @var string |
|
26 | - */ |
|
23 | + /** |
|
24 | + * The date format string. |
|
25 | + * @var string |
|
26 | + */ |
|
27 | 27 | private $formatString; |
28 | 28 | |
29 | - /** |
|
30 | - * @var Mailcode_Date_FormatInfo |
|
31 | - */ |
|
29 | + /** |
|
30 | + * @var Mailcode_Date_FormatInfo |
|
31 | + */ |
|
32 | 32 | private $formatInfo; |
33 | 33 | |
34 | 34 | public function getName() : string |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | ); |
89 | 89 | } |
90 | 90 | |
91 | - /** |
|
92 | - * Retrieves the format string used to format the date. |
|
93 | - * |
|
94 | - * @return string A PHP compatible date format string. |
|
95 | - */ |
|
91 | + /** |
|
92 | + * Retrieves the format string used to format the date. |
|
93 | + * |
|
94 | + * @return string A PHP compatible date format string. |
|
95 | + */ |
|
96 | 96 | public function getFormatString() : string |
97 | 97 | { |
98 | 98 | return $this->formatString; |
@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | abstract class Mailcode_Translator_Syntax_ApacheVelocity extends Mailcode_Translator_Command |
22 | 22 | { |
23 | 23 | /** |
24 | - * @var string[] |
|
25 | - */ |
|
24 | + * @var string[] |
|
25 | + */ |
|
26 | 26 | private $regexSpecialChars = array( |
27 | 27 | '?', |
28 | 28 | '.', |
@@ -47,15 +47,15 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
50 | - * Filters the string for use in an Apache Velocity (Java) |
|
51 | - * regex string: escapes all special characters. |
|
52 | - * |
|
53 | - * Velocity does its own escaping, so no need to escape special |
|
54 | - * characters as if they were a javascript string. |
|
55 | - * |
|
56 | - * @param string $string |
|
57 | - * @return string |
|
58 | - */ |
|
50 | + * Filters the string for use in an Apache Velocity (Java) |
|
51 | + * regex string: escapes all special characters. |
|
52 | + * |
|
53 | + * Velocity does its own escaping, so no need to escape special |
|
54 | + * characters as if they were a javascript string. |
|
55 | + * |
|
56 | + * @param string $string |
|
57 | + * @return string |
|
58 | + */ |
|
59 | 59 | public function filterRegexString(string $string) : string |
60 | 60 | { |
61 | 61 | // Special case: previously escaped quotes. |
@@ -30,19 +30,19 @@ |
||
30 | 30 | public const VALIDATION_UNCLOSED_COMMAND = 49104; |
31 | 31 | public const VALIDATION_CLOSING_NON_OPENING_COMMAND = 49105; |
32 | 32 | |
33 | - /** |
|
34 | - * @var Mailcode_Collection |
|
35 | - */ |
|
33 | + /** |
|
34 | + * @var Mailcode_Collection |
|
35 | + */ |
|
36 | 36 | protected $collection; |
37 | 37 | |
38 | - /** |
|
39 | - * @var OperationResult |
|
40 | - */ |
|
38 | + /** |
|
39 | + * @var OperationResult |
|
40 | + */ |
|
41 | 41 | protected $validationResult; |
42 | 42 | |
43 | - /** |
|
44 | - * @var Mailcode_Commands_Command_Type[] |
|
45 | - */ |
|
43 | + /** |
|
44 | + * @var Mailcode_Commands_Command_Type[] |
|
45 | + */ |
|
46 | 46 | protected $stack = array(); |
47 | 47 | |
48 | 48 | public function __construct(Mailcode_Collection $collection) |
@@ -28,8 +28,8 @@ discard block |
||
28 | 28 | public const URL_ENCODING_DECODE = 'decode'; |
29 | 29 | |
30 | 30 | /** |
31 | - * @var Mailcode_Factory_CommandSets |
|
32 | - */ |
|
31 | + * @var Mailcode_Factory_CommandSets |
|
32 | + */ |
|
33 | 33 | private static $commandSets; |
34 | 34 | |
35 | 35 | /** |
@@ -83,33 +83,33 @@ discard block |
||
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
86 | - * Creates a renderer instance, which can be used to easily |
|
87 | - * create and convert commands to strings. |
|
88 | - * |
|
89 | - * @return Mailcode_Renderer |
|
90 | - */ |
|
86 | + * Creates a renderer instance, which can be used to easily |
|
87 | + * create and convert commands to strings. |
|
88 | + * |
|
89 | + * @return Mailcode_Renderer |
|
90 | + */ |
|
91 | 91 | public static function createRenderer() : Mailcode_Renderer |
92 | 92 | { |
93 | 93 | return new Mailcode_Renderer(); |
94 | 94 | } |
95 | 95 | |
96 | - /** |
|
97 | - * Creates a printer instance, which works like the renderer, |
|
98 | - * but outputs the generated strings to standard output. |
|
99 | - * |
|
100 | - * @return Mailcode_Printer |
|
101 | - */ |
|
96 | + /** |
|
97 | + * Creates a printer instance, which works like the renderer, |
|
98 | + * but outputs the generated strings to standard output. |
|
99 | + * |
|
100 | + * @return Mailcode_Printer |
|
101 | + */ |
|
102 | 102 | public static function createPrinter() : Mailcode_Printer |
103 | 103 | { |
104 | 104 | return new Mailcode_Printer(); |
105 | 105 | } |
106 | 106 | |
107 | - /** |
|
108 | - * Gets/creates the global instance of the date format info |
|
109 | - * class, used to handle date formatting aspects. |
|
110 | - * |
|
111 | - * @return Mailcode_Date_FormatInfo |
|
112 | - */ |
|
107 | + /** |
|
108 | + * Gets/creates the global instance of the date format info |
|
109 | + * class, used to handle date formatting aspects. |
|
110 | + * |
|
111 | + * @return Mailcode_Date_FormatInfo |
|
112 | + */ |
|
113 | 113 | public static function createDateInfo() : Mailcode_Date_FormatInfo |
114 | 114 | { |
115 | 115 | return Mailcode_Date_FormatInfo::getInstance(); |
@@ -27,21 +27,21 @@ discard block |
||
27 | 27 | public const ERROR_COMMAND_DOES_NOT_EXIST = 45902; |
28 | 28 | public const ERROR_INVALID_DUMMY_COMMAND_TYPE = 45903; |
29 | 29 | |
30 | - /** |
|
31 | - * @var Mailcode_Commands_Command[] |
|
32 | - */ |
|
30 | + /** |
|
31 | + * @var Mailcode_Commands_Command[] |
|
32 | + */ |
|
33 | 33 | private $commands = array(); |
34 | 34 | |
35 | - /** |
|
36 | - * @var array<string,Mailcode_Commands_Command> |
|
37 | - */ |
|
35 | + /** |
|
36 | + * @var array<string,Mailcode_Commands_Command> |
|
37 | + */ |
|
38 | 38 | private static $dummyCommands = array(); |
39 | 39 | |
40 | - /** |
|
41 | - * Retrieves a list of all available command IDs. |
|
42 | - * |
|
43 | - * @return string[] |
|
44 | - */ |
|
40 | + /** |
|
41 | + * Retrieves a list of all available command IDs. |
|
42 | + * |
|
43 | + * @return string[] |
|
44 | + */ |
|
45 | 45 | public function getIDs() : array |
46 | 46 | { |
47 | 47 | static $ids = array(); |
@@ -87,12 +87,12 @@ discard block |
||
87 | 87 | return $result; |
88 | 88 | } |
89 | 89 | |
90 | - /** |
|
91 | - * Gets an available command by its ID. |
|
92 | - * |
|
93 | - * @param string $id |
|
94 | - * @return Mailcode_Commands_Command |
|
95 | - */ |
|
90 | + /** |
|
91 | + * Gets an available command by its ID. |
|
92 | + * |
|
93 | + * @param string $id |
|
94 | + * @return Mailcode_Commands_Command |
|
95 | + */ |
|
96 | 96 | public function getByID(string $id) : Mailcode_Commands_Command |
97 | 97 | { |
98 | 98 | static $instances = array(); |
@@ -105,15 +105,15 @@ discard block |
||
105 | 105 | return $instances[$id]; |
106 | 106 | } |
107 | 107 | |
108 | - /** |
|
109 | - * Retrieves the ID of a command by its name. |
|
110 | - * |
|
111 | - * @param string $name |
|
112 | - * @throws Mailcode_Exception |
|
113 | - * @return string |
|
114 | - * |
|
115 | - * @see Mailcode_Commands::ERROR_COMMAND_NAME_DOES_NOT_EXIST |
|
116 | - */ |
|
108 | + /** |
|
109 | + * Retrieves the ID of a command by its name. |
|
110 | + * |
|
111 | + * @param string $name |
|
112 | + * @throws Mailcode_Exception |
|
113 | + * @return string |
|
114 | + * |
|
115 | + * @see Mailcode_Commands::ERROR_COMMAND_NAME_DOES_NOT_EXIST |
|
116 | + */ |
|
117 | 117 | public function getIDByName(string $name) : string |
118 | 118 | { |
119 | 119 | $items = $this->getAll(); |
@@ -142,12 +142,12 @@ discard block |
||
142 | 142 | return in_array($id, $ids); |
143 | 143 | } |
144 | 144 | |
145 | - /** |
|
146 | - * Checks wether the specified name exists. |
|
147 | - * |
|
148 | - * @param string $name For example: "showvar". |
|
149 | - * @return bool |
|
150 | - */ |
|
145 | + /** |
|
146 | + * Checks wether the specified name exists. |
|
147 | + * |
|
148 | + * @param string $name For example: "showvar". |
|
149 | + * @return bool |
|
150 | + */ |
|
151 | 151 | public function nameExists(string $name) : bool |
152 | 152 | { |
153 | 153 | $items = $this->getAll(); |
@@ -201,14 +201,14 @@ discard block |
||
201 | 201 | return $class; |
202 | 202 | } |
203 | 203 | |
204 | - /** |
|
205 | - * Translates the command type to the expected class naming scheme. |
|
206 | - * |
|
207 | - * Example: not-empty => NotEmpty |
|
208 | - * |
|
209 | - * @param string $type |
|
210 | - * @return string |
|
211 | - */ |
|
204 | + /** |
|
205 | + * Translates the command type to the expected class naming scheme. |
|
206 | + * |
|
207 | + * Example: not-empty => NotEmpty |
|
208 | + * |
|
209 | + * @param string $type |
|
210 | + * @return string |
|
211 | + */ |
|
212 | 212 | private function adjustTypeName(string $type) : string |
213 | 213 | { |
214 | 214 | $type = str_replace('-', ' ', $type); |