Passed
Push — master ( f32d8a...827600 )
by Sebastian
03:12 queued 10s
created
src/Mailcode/Commands/Command/For.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -27,19 +27,19 @@
 block discarded – undo
27 27
     const VALIDATION_WRONG_KEYWORD = 49702;
28 28
     const VALIDATION_VARIABLE_NAME_IS_THE_SAME = 49703;
29 29
     
30
-   /**
31
-    * @var Mailcode_Parser_Statement_Tokenizer_Token_Variable|NULL
32
-    */
30
+    /**
31
+     * @var Mailcode_Parser_Statement_Tokenizer_Token_Variable|NULL
32
+     */
33 33
     private $loopVar;
34 34
     
35
-   /**
36
-    * @var Mailcode_Parser_Statement_Tokenizer_Token_Variable|NULL
37
-    */
35
+    /**
36
+     * @var Mailcode_Parser_Statement_Tokenizer_Token_Variable|NULL
37
+     */
38 38
     private $sourceVar;
39 39
     
40
-   /**
41
-    * @var Mailcode_Parser_Statement_Tokenizer_Token_Keyword|NULL
42
-    */
40
+    /**
41
+     * @var Mailcode_Parser_Statement_Tokenizer_Token_Keyword|NULL
42
+     */
43 43
     private $keyword;
44 44
     
45 45
     public function getName() : string
Please login to merge, or discard this patch.
src/Mailcode/Factory.php 1 patch
Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -23,17 +23,17 @@  discard block
 block discarded – undo
23 23
     const ERROR_INVALID_COMMAND_CREATED = 50001;
24 24
     const ERROR_UNEXPECTED_COMMAND_TYPE = 50002;
25 25
 
26
-   /**
27
-    * @var Mailcode_Factory_CommandSets
28
-    */
26
+    /**
27
+     * @var Mailcode_Factory_CommandSets
28
+     */
29 29
     private static $commandSets;
30 30
     
31
-   /**
32
-    * Creates a ShowVariable command.
33
-    * 
34
-    * @param string $variableName A variable name, with or without the $ sign prepended.
35
-    * @return Mailcode_Commands_Command_ShowVariable
36
-    */
31
+    /**
32
+     * Creates a ShowVariable command.
33
+     * 
34
+     * @param string $variableName A variable name, with or without the $ sign prepended.
35
+     * @return Mailcode_Commands_Command_ShowVariable
36
+     */
37 37
     public static function showVar(string $variableName) : Mailcode_Commands_Command_ShowVariable
38 38
     {
39 39
         return self::$commandSets->show()->showVar($variableName);
@@ -52,41 +52,41 @@  discard block
 block discarded – undo
52 52
         return self::$commandSets->show()->showDate($variableName, $formatString);
53 53
     }
54 54
 
55
-   /**
56
-    * Creates a ShowSnippet command.
57
-    *
58
-    * @param string $snippetName A snippet name, with or without the $ sign prepended.
59
-    * @return Mailcode_Commands_Command_ShowSnippet
60
-    */
55
+    /**
56
+     * Creates a ShowSnippet command.
57
+     *
58
+     * @param string $snippetName A snippet name, with or without the $ sign prepended.
59
+     * @return Mailcode_Commands_Command_ShowSnippet
60
+     */
61 61
     public static function showSnippet(string $snippetName) : Mailcode_Commands_Command_ShowSnippet
62 62
     {
63 63
         return self::$commandSets->show()->showSnippet($snippetName);
64 64
     }
65 65
     
66
-   /**
67
-    * Creates a SetVariable command.
68
-    * 
69
-    * @param string $variableName A variable name, with or without the $ sign prepended.
70
-    * @param string $value
71
-    * @param bool $quoteValue Whether to treat the value as a string literal, and add quotes to it.
72
-    * @return Mailcode_Commands_Command_SetVariable
73
-    * @throws Mailcode_Factory_Exception
74
-    * 
75
-    * @see Mailcode_Factory::ERROR_INVALID_COMMAND_CREATED
76
-    */
66
+    /**
67
+     * Creates a SetVariable command.
68
+     * 
69
+     * @param string $variableName A variable name, with or without the $ sign prepended.
70
+     * @param string $value
71
+     * @param bool $quoteValue Whether to treat the value as a string literal, and add quotes to it.
72
+     * @return Mailcode_Commands_Command_SetVariable
73
+     * @throws Mailcode_Factory_Exception
74
+     * 
75
+     * @see Mailcode_Factory::ERROR_INVALID_COMMAND_CREATED
76
+     */
77 77
     public static function setVar(string $variableName, string $value, bool $quoteValue=true) : Mailcode_Commands_Command_SetVariable
78 78
     {
79 79
         return self::$commandSets->set()->setVar($variableName, $value, $quoteValue);
80 80
     }
81 81
     
82
-   /**
83
-    * Like setVar(), but treats the value as a string literal
84
-    * and automatically adds quotes to it.
85
-    * 
86
-    * @param string $variableName
87
-    * @param string $value
88
-    * @return Mailcode_Commands_Command_SetVariable
89
-    */
82
+    /**
83
+     * Like setVar(), but treats the value as a string literal
84
+     * and automatically adds quotes to it.
85
+     * 
86
+     * @param string $variableName
87
+     * @param string $value
88
+     * @return Mailcode_Commands_Command_SetVariable
89
+     */
90 90
     public static function setVarString(string $variableName, string $value) : Mailcode_Commands_Command_SetVariable
91 91
     {
92 92
         return self::$commandSets->set()->setVar($variableName, $value, true);
@@ -212,14 +212,14 @@  discard block
 block discarded – undo
212 212
         return self::$commandSets->if()->ifContains($variable, array($search), $caseInsensitive);
213 213
     }
214 214
     
215
-   /**
216
-    * Creates if contains command, with several search terms.
217
-    * 
218
-    * @param string $variable
219
-    * @param string[] $searchTerms List of search terms. Do not add surrounding quotes.
220
-    * @param bool $caseInsensitive
221
-    * @return Mailcode_Commands_Command_If_Contains
222
-    */
215
+    /**
216
+     * Creates if contains command, with several search terms.
217
+     * 
218
+     * @param string $variable
219
+     * @param string[] $searchTerms List of search terms. Do not add surrounding quotes.
220
+     * @param bool $caseInsensitive
221
+     * @return Mailcode_Commands_Command_If_Contains
222
+     */
223 223
     public static function ifContainsAny(string $variable, array $searchTerms, bool $caseInsensitive=false) : Mailcode_Commands_Command_If_Contains
224 224
     {
225 225
         return self::$commandSets->if()->ifContains($variable, $searchTerms, $caseInsensitive);
@@ -230,14 +230,14 @@  discard block
 block discarded – undo
230 230
         return self::$commandSets->elseIf()->elseIfContains($variable, array($search), $caseInsensitive);
231 231
     }
232 232
     
233
-   /**
234
-    * Creates else if contains command, with several search terms.
235
-    * 
236
-    * @param string $variable
237
-    * @param string[] $searchTerms List of search terms. Do not add surrounding quotes.
238
-    * @param bool $caseInsensitive
239
-    * @return Mailcode_Commands_Command_ElseIf_Contains
240
-    */
233
+    /**
234
+     * Creates else if contains command, with several search terms.
235
+     * 
236
+     * @param string $variable
237
+     * @param string[] $searchTerms List of search terms. Do not add surrounding quotes.
238
+     * @param bool $caseInsensitive
239
+     * @return Mailcode_Commands_Command_ElseIf_Contains
240
+     */
241 241
     public static function elseIfContainsAny(string $variable, array $searchTerms, bool $caseInsensitive=false) : Mailcode_Commands_Command_ElseIf_Contains
242 242
     {
243 243
         return self::$commandSets->elseIf()->elseIfContains($variable, $searchTerms, $caseInsensitive);
@@ -258,34 +258,34 @@  discard block
 block discarded – undo
258 258
         return self::$commandSets->misc()->for($sourceVariable, $loopVariable);
259 259
     }
260 260
     
261
-   /**
262
-    * Creates a renderer instance, which can be used to easily
263
-    * create and convert commands to strings.
264
-    * 
265
-    * @return Mailcode_Renderer
266
-    */
261
+    /**
262
+     * Creates a renderer instance, which can be used to easily
263
+     * create and convert commands to strings.
264
+     * 
265
+     * @return Mailcode_Renderer
266
+     */
267 267
     public static function createRenderer() : Mailcode_Renderer
268 268
     {
269 269
         return new Mailcode_Renderer();
270 270
     }
271 271
     
272
-   /**
273
-    * Creates a printer instance, which works like the renderer,
274
-    * but outputs the generated strings to standard output.
275
-    * 
276
-    * @return Mailcode_Printer
277
-    */
272
+    /**
273
+     * Creates a printer instance, which works like the renderer,
274
+     * but outputs the generated strings to standard output.
275
+     * 
276
+     * @return Mailcode_Printer
277
+     */
278 278
     public static function createPrinter() : Mailcode_Printer
279 279
     {
280 280
         return new Mailcode_Printer();
281 281
     }
282 282
     
283
-   /**
284
-    * Gets/creates the global instance of the date format info
285
-    * class, used to handle date formatting aspects.
286
-    * 
287
-    * @return Mailcode_Date_FormatInfo
288
-    */
283
+    /**
284
+     * Gets/creates the global instance of the date format info
285
+     * class, used to handle date formatting aspects.
286
+     * 
287
+     * @return Mailcode_Date_FormatInfo
288
+     */
289 289
     public static function createDateInfo() : Mailcode_Date_FormatInfo
290 290
     {
291 291
         return Mailcode_Date_FormatInfo::getInstance();
Please login to merge, or discard this patch.
src/Mailcode.php 1 patch
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -26,51 +26,51 @@  discard block
 block discarded – undo
26 26
  */
27 27
 class Mailcode
28 28
 {
29
-   /**
30
-    * @var Mailcode_Parser|NULL
31
-    */
29
+    /**
30
+     * @var Mailcode_Parser|NULL
31
+     */
32 32
     protected $parser = null;
33 33
     
34
-   /**
35
-    * @var Mailcode_Commands|NULL
36
-    */
34
+    /**
35
+     * @var Mailcode_Commands|NULL
36
+     */
37 37
     protected $commands = null;
38 38
     
39
-   /**
40
-    * @var Mailcode_Variables|NULL
41
-    */
39
+    /**
40
+     * @var Mailcode_Variables|NULL
41
+     */
42 42
     protected $variables = null;
43 43
     
44
-   /**
45
-    * @var Mailcode_Translator|NULL
46
-    */
44
+    /**
45
+     * @var Mailcode_Translator|NULL
46
+     */
47 47
     protected $translator = null;
48 48
     
49
-   /**
50
-    * Creates a new mailcode instance.
51
-    * @return Mailcode
52
-    */
49
+    /**
50
+     * Creates a new mailcode instance.
51
+     * @return Mailcode
52
+     */
53 53
     public static function create() : Mailcode
54 54
     {
55 55
         return new Mailcode();
56 56
     }
57 57
     
58
-   /**
59
-    * Parses the string to detect all commands contained within.
60
-    * 
61
-    * @param string $string
62
-    * @return Mailcode_Collection
63
-    */
58
+    /**
59
+     * Parses the string to detect all commands contained within.
60
+     * 
61
+     * @param string $string
62
+     * @return Mailcode_Collection
63
+     */
64 64
     public function parseString(string $string) : Mailcode_Collection
65 65
     {
66 66
         return $this->getParser()->parseString($string);
67 67
     }
68 68
     
69
-   /**
70
-    * Retrieves the string parser instance used to detect commands.
71
-    * 
72
-    * @return Mailcode_Parser
73
-    */
69
+    /**
70
+     * Retrieves the string parser instance used to detect commands.
71
+     * 
72
+     * @return Mailcode_Parser
73
+     */
74 74
     public function getParser() : Mailcode_Parser
75 75
     {
76 76
         if(!isset($this->parser)) 
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
         return $this->parser;
82 82
     }
83 83
     
84
-   /**
85
-    * Retrieves the commands collection, which is used to
86
-    * access information on the available commands.
87
-    * 
88
-    * @return Mailcode_Commands
89
-    */
84
+    /**
85
+     * Retrieves the commands collection, which is used to
86
+     * access information on the available commands.
87
+     * 
88
+     * @return Mailcode_Commands
89
+     */
90 90
     public function getCommands() : Mailcode_Commands
91 91
     {
92 92
         if(!isset($this->commands)) 
@@ -107,12 +107,12 @@  discard block
 block discarded – undo
107 107
         return new Mailcode_StringContainer($subject);
108 108
     }
109 109
     
110
-   /**
111
-    * Attempts to find all variables in the target string.
112
-    * 
113
-    * @param string $subject
114
-    * @return Mailcode_Variables_Collection_Regular
115
-    */
110
+    /**
111
+     * Attempts to find all variables in the target string.
112
+     * 
113
+     * @param string $subject
114
+     * @return Mailcode_Variables_Collection_Regular
115
+     */
116 116
     public function findVariables(string $subject) : Mailcode_Variables_Collection_Regular
117 117
     {
118 118
         return $this->createVariables()->parseString($subject);
@@ -128,12 +128,12 @@  discard block
 block discarded – undo
128 128
         return $this->variables;
129 129
     }
130 130
     
131
-   /**
132
-    * Creates the translator, which can be used to convert commands
133
-    * to another supported syntax.
134
-    * 
135
-    * @return Mailcode_Translator
136
-    */
131
+    /**
132
+     * Creates the translator, which can be used to convert commands
133
+     * to another supported syntax.
134
+     * 
135
+     * @return Mailcode_Translator
136
+     */
137 137
     public function createTranslator() : Mailcode_Translator
138 138
     {
139 139
         if(!isset($this->translator))
@@ -144,12 +144,12 @@  discard block
 block discarded – undo
144 144
         return $this->translator;
145 145
     }
146 146
     
147
-   /**
148
-    * Creates the styler, which can be used to retrieve the 
149
-    * CSS required to style the highlighted commands in HTML.
150
-    * 
151
-    * @return Mailcode_Styler
152
-    */
147
+    /**
148
+     * Creates the styler, which can be used to retrieve the 
149
+     * CSS required to style the highlighted commands in HTML.
150
+     * 
151
+     * @return Mailcode_Styler
152
+     */
153 153
     public function createStyler() : Mailcode_Styler
154 154
     {
155 155
         return new Mailcode_Styler();
Please login to merge, or discard this patch.
src/Mailcode/Parser/Safeguard/Formatter/ReplacerType.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@
 block discarded – undo
35 35
         }
36 36
     }
37 37
     
38
-   /**
39
-    * Resolves the string with which this location needs to be
40
-    * replaced.
41
-    * 
42
-    * @param Mailcode_Parser_Safeguard_Formatter_Location $location
43
-    * @return string
44
-    */
38
+    /**
39
+     * Resolves the string with which this location needs to be
40
+     * replaced.
41
+     * 
42
+     * @param Mailcode_Parser_Safeguard_Formatter_Location $location
43
+     * @return string
44
+     */
45 45
     private function resolveReplacement(Mailcode_Parser_Safeguard_Formatter_Location $location) : string
46 46
     {
47 47
         if($location->requiresAdjustment())
Please login to merge, or discard this patch.
src/Mailcode/Parser/Safeguard/Formatter/Type/SingleLines.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,14 +23,14 @@
 block discarded – undo
23 23
  */
24 24
 class Mailcode_Parser_Safeguard_Formatter_Type_SingleLines extends Mailcode_Parser_Safeguard_Formatter_FormatType
25 25
 {
26
-   /**
27
-    * @var string
28
-    */
26
+    /**
27
+     * @var string
28
+     */
29 29
     private $eol;
30 30
     
31
-   /**
32
-    * @var int
33
-    */
31
+    /**
32
+     * @var int
33
+     */
34 34
     private $eolLength;
35 35
     
36 36
     protected function initFormatting() : void
Please login to merge, or discard this patch.
src/Mailcode/Parser/Safeguard/Formatter/Type/SingleLines/Location.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@
 block discarded – undo
25 25
  */
26 26
 class Mailcode_Parser_Safeguard_Formatter_Type_SingleLines_Location extends Mailcode_Parser_Safeguard_Formatter_Location
27 27
 {
28
-   /**
29
-    * @var int
30
-    */
28
+    /**
29
+     * @var int
30
+     */
31 31
     protected $eolLength;
32 32
     
33
-   /**
34
-    * @var string
35
-    */
33
+    /**
34
+     * @var string
35
+     */
36 36
     protected $eol;
37 37
     
38 38
     protected function init() : void
Please login to merge, or discard this patch.
src/Mailcode/Parser/Safeguard/Formatter/Type/MarkVariables.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@
 block discarded – undo
29 29
     
30 30
     const ERROR_INVALID_TAG_TEMPLATE = 66101;
31 31
     
32
-   /**
33
-    * @var string
34
-    */
32
+    /**
33
+     * @var string
34
+     */
35 35
     private $tagTemplate = '<span class="mailcode-marked-variable">%s</span>';
36 36
     
37 37
     protected function initFormatting() : void
Please login to merge, or discard this patch.
src/Mailcode/Parser/Safeguard/Formatter/FormatType.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@
 block discarded – undo
25 25
         return PHP_INT_MAX;
26 26
     }
27 27
 
28
-   /**
29
-    * Formats the specified string according to the formatter.
30
-    * Retrieve the updated string from the string container used
31
-    * to create the formatter, or use `getSubjectString()`.
32
-    */
28
+    /**
29
+     * Formats the specified string according to the formatter.
30
+     * Retrieve the updated string from the string container used
31
+     * to create the formatter, or use `getSubjectString()`.
32
+     */
33 33
     public function format() : void
34 34
     {
35 35
         $locations = $this->resolveLocations();
Please login to merge, or discard this patch.
src/Mailcode/Parser/Safeguard.php 1 patch
Indentation   +144 added lines, -144 removed lines patch added patch discarded remove patch
@@ -53,50 +53,50 @@  discard block
 block discarded – undo
53 53
     const ERROR_EMPTY_DELIMITER = 47803;
54 54
     const ERROR_PLACEHOLDER_NOT_FOUND = 47804;
55 55
     
56
-   /**
57
-    * @var Mailcode_Parser
58
-    */
56
+    /**
57
+     * @var Mailcode_Parser
58
+     */
59 59
     protected $parser;
60 60
     
61
-   /**
62
-    * @var Mailcode_Collection
63
-    */
61
+    /**
62
+     * @var Mailcode_Collection
63
+     */
64 64
     protected $commands;
65 65
     
66
-   /**
67
-    * @var string
68
-    */
66
+    /**
67
+     * @var string
68
+     */
69 69
     protected $originalString;
70 70
     
71
-   /**
72
-    * @var Mailcode_Collection
73
-    */
71
+    /**
72
+     * @var Mailcode_Collection
73
+     */
74 74
     protected $collection;
75 75
     
76
-   /**
77
-    * Counter for the placeholders, global for all placeholders.
78
-    * @var integer
79
-    */
76
+    /**
77
+     * Counter for the placeholders, global for all placeholders.
78
+     * @var integer
79
+     */
80 80
     private static $counter = 0;
81 81
     
82
-   /**
83
-    * @var Mailcode_Parser_Safeguard_Placeholder[]
84
-    */
82
+    /**
83
+     * @var Mailcode_Parser_Safeguard_Placeholder[]
84
+     */
85 85
     protected $placeholders;
86 86
     
87
-   /**
88
-    * @var string
89
-    */
87
+    /**
88
+     * @var string
89
+     */
90 90
     protected $delimiter = '__';
91 91
     
92
-   /**
93
-    * @var string[]|NULL
94
-    */
92
+    /**
93
+     * @var string[]|NULL
94
+     */
95 95
     protected $placeholderStrings;
96 96
     
97
-   /**
98
-    * @var Mailcode_Parser_Safeguard_Formatting|NULL
99
-    */
97
+    /**
98
+     * @var Mailcode_Parser_Safeguard_Formatting|NULL
99
+     */
100 100
     private $formatting = null;
101 101
     
102 102
     public function __construct(Mailcode_Parser $parser, string $subject)
@@ -105,25 +105,25 @@  discard block
 block discarded – undo
105 105
         $this->originalString = $subject;
106 106
     }
107 107
     
108
-   /**
109
-    * Retrieves the string the safeguard was created for.
110
-    * 
111
-    * @return string
112
-    */
108
+    /**
109
+     * Retrieves the string the safeguard was created for.
110
+     * 
111
+     * @return string
112
+     */
113 113
     public function getOriginalString() : string
114 114
     {
115 115
         return $this->originalString;
116 116
     }
117 117
     
118
-   /**
119
-    * Sets the delimiter character sequence used to prepend
120
-    * and append to the placeholders.
121
-    * 
122
-    * The delimiter's default is "__" (two underscores).
123
-    * 
124
-    * @param string $delimiter
125
-    * @return Mailcode_Parser_Safeguard
126
-    */
118
+    /**
119
+     * Sets the delimiter character sequence used to prepend
120
+     * and append to the placeholders.
121
+     * 
122
+     * The delimiter's default is "__" (two underscores).
123
+     * 
124
+     * @param string $delimiter
125
+     * @return Mailcode_Parser_Safeguard
126
+     */
127 127
     public function setDelimiter(string $delimiter) : Mailcode_Parser_Safeguard
128 128
     {
129 129
         if(empty($delimiter))
@@ -145,15 +145,15 @@  discard block
 block discarded – undo
145 145
         return $this->delimiter;
146 146
     }
147 147
     
148
-   /**
149
-    * Retrieves the safe string in which all commands have been replaced
150
-    * by placeholder strings.
151
-    *
152
-    * @return string
153
-    * @throws Mailcode_Exception 
154
-    *
155
-    * @see Mailcode_Parser_Safeguard::ERROR_INVALID_COMMANDS
156
-    */
148
+    /**
149
+     * Retrieves the safe string in which all commands have been replaced
150
+     * by placeholder strings.
151
+     *
152
+     * @return string
153
+     * @throws Mailcode_Exception 
154
+     *
155
+     * @see Mailcode_Parser_Safeguard::ERROR_INVALID_COMMANDS
156
+     */
157 157
     public function makeSafe() : string
158 158
     {
159 159
         $this->requireValidCollection();
@@ -161,16 +161,16 @@  discard block
 block discarded – undo
161 161
         return $this->makeSafePartial();
162 162
     }
163 163
     
164
-   /**
165
-    * Like makeSafe(), but allows partial (invalid) commands: use this
166
-    * if the subject string may contain only part of the whole set of
167
-    * commands. 
168
-    * 
169
-    * Example: parsing a text with an opening if statement, without the 
170
-    * matching end statement.
171
-    * 
172
-    * @return string
173
-    */
164
+    /**
165
+     * Like makeSafe(), but allows partial (invalid) commands: use this
166
+     * if the subject string may contain only part of the whole set of
167
+     * commands. 
168
+     * 
169
+     * Example: parsing a text with an opening if statement, without the 
170
+     * matching end statement.
171
+     * 
172
+     * @return string
173
+     */
174 174
     public function makeSafePartial() : string
175 175
     {
176 176
         $placeholders = $this->getPlaceholders();
@@ -200,13 +200,13 @@  discard block
 block discarded – undo
200 200
         return $string;
201 201
     }
202 202
     
203
-   /**
204
-    * Creates a formatting handler, which can be used to specify
205
-    * which formattings to use for the commands in the subject string.
206
-    * 
207
-    * @param Mailcode_StringContainer|string $subject
208
-    * @return Mailcode_Parser_Safeguard_Formatting
209
-    */
203
+    /**
204
+     * Creates a formatting handler, which can be used to specify
205
+     * which formattings to use for the commands in the subject string.
206
+     * 
207
+     * @param Mailcode_StringContainer|string $subject
208
+     * @return Mailcode_Parser_Safeguard_Formatting
209
+     */
210 210
     public function createFormatting($subject) : Mailcode_Parser_Safeguard_Formatting
211 211
     {
212 212
         if(is_string($subject))
@@ -217,12 +217,12 @@  discard block
 block discarded – undo
217 217
         return new Mailcode_Parser_Safeguard_Formatting($this, $subject);
218 218
     }
219 219
     
220
-   /**
221
-    * Retrieves all placeholders that have to be added to
222
-    * the subject text.
223
-    * 
224
-    * @return \Mailcode\Mailcode_Parser_Safeguard_Placeholder[]
225
-    */
220
+    /**
221
+     * Retrieves all placeholders that have to be added to
222
+     * the subject text.
223
+     * 
224
+     * @return \Mailcode\Mailcode_Parser_Safeguard_Placeholder[]
225
+     */
226 226
     public function getPlaceholders()
227 227
     {
228 228
         if(isset($this->placeholders))
@@ -269,16 +269,16 @@  discard block
 block discarded – undo
269 269
         return $formatting->toString();
270 270
     }
271 271
     
272
-   /**
273
-    * Makes the string whole again after transforming or filtering it,
274
-    * by replacing the command placeholders with the original commands.
275
-    *
276
-    * @param string $string
277
-    * @return string
278
-    * @throws Mailcode_Exception
279
-    *
280
-    * @see Mailcode_Parser_Safeguard::ERROR_INVALID_COMMANDS
281
-    */
272
+    /**
273
+     * Makes the string whole again after transforming or filtering it,
274
+     * by replacing the command placeholders with the original commands.
275
+     *
276
+     * @param string $string
277
+     * @return string
278
+     * @throws Mailcode_Exception
279
+     *
280
+     * @see Mailcode_Parser_Safeguard::ERROR_INVALID_COMMANDS
281
+     */
282 282
     public function makeWhole(string $string) : string
283 283
     {
284 284
         return $this->restore(
@@ -288,15 +288,15 @@  discard block
 block discarded – undo
288 288
         );
289 289
     }
290 290
     
291
-   /**
292
-    * Like `makeWhole()`, but ignores missing command placeholders.
293
-    *
294
-    * @param string $string
295
-    * @return string
296
-    * @throws Mailcode_Exception
297
-    *
298
-    * @see Mailcode_Parser_Safeguard::ERROR_INVALID_COMMANDS
299
-    */
291
+    /**
292
+     * Like `makeWhole()`, but ignores missing command placeholders.
293
+     *
294
+     * @param string $string
295
+     * @return string
296
+     * @throws Mailcode_Exception
297
+     *
298
+     * @see Mailcode_Parser_Safeguard::ERROR_INVALID_COMMANDS
299
+     */
300 300
     public function makeWholePartial(string $string) : string
301 301
     {
302 302
         return $this->restore(
@@ -306,19 +306,19 @@  discard block
 block discarded – undo
306 306
         );
307 307
     }
308 308
 
309
-   /**
310
-    * Like `makeWhole()`, but replaces the commands with a syntax
311
-    * highlighted version, meant for human readable texts only.
312
-    * 
313
-    * Note: the commands lose their functionality (They cannot be 
314
-    * parsed from that string again).
315
-    *
316
-    * @param string $string
317
-    * @return string
318
-    * @throws Mailcode_Exception
319
-    *
320
-    * @see Mailcode_Parser_Safeguard::ERROR_INVALID_COMMANDS
321
-    */
309
+    /**
310
+     * Like `makeWhole()`, but replaces the commands with a syntax
311
+     * highlighted version, meant for human readable texts only.
312
+     * 
313
+     * Note: the commands lose their functionality (They cannot be 
314
+     * parsed from that string again).
315
+     *
316
+     * @param string $string
317
+     * @return string
318
+     * @throws Mailcode_Exception
319
+     *
320
+     * @see Mailcode_Parser_Safeguard::ERROR_INVALID_COMMANDS
321
+     */
322 322
     public function makeHighlighted(string $string) : string
323 323
     {
324 324
         return $this->restore(
@@ -328,15 +328,15 @@  discard block
 block discarded – undo
328 328
         );
329 329
     }
330 330
     
331
-   /**
332
-    * Like `makeHighlighted()`, but ignores missing command placeholders.
333
-    * 
334
-    * @param string $string
335
-    * @return string
336
-    * @throws Mailcode_Exception
337
-    *
338
-    * @see Mailcode_Parser_Safeguard::ERROR_INVALID_COMMANDS
339
-    */
331
+    /**
332
+     * Like `makeHighlighted()`, but ignores missing command placeholders.
333
+     * 
334
+     * @param string $string
335
+     * @return string
336
+     * @throws Mailcode_Exception
337
+     *
338
+     * @see Mailcode_Parser_Safeguard::ERROR_INVALID_COMMANDS
339
+     */
340 340
     public function makeHighlightedPartial(string $string) : string
341 341
     {
342 342
         return $this->restore(
@@ -346,11 +346,11 @@  discard block
 block discarded – undo
346 346
         );
347 347
     }
348 348
     
349
-   /**
350
-    * Retrieves the commands collection contained in the string.
351
-    * 
352
-    * @return Mailcode_Collection
353
-    */
349
+    /**
350
+     * Retrieves the commands collection contained in the string.
351
+     * 
352
+     * @return Mailcode_Collection
353
+     */
354 354
     public function getCollection() : Mailcode_Collection
355 355
     {
356 356
         if(isset($this->collection))
@@ -368,11 +368,11 @@  discard block
 block discarded – undo
368 368
         return $this->getCollection()->isValid();
369 369
     }
370 370
     
371
-   /**
372
-    * @throws Mailcode_Exception
373
-    * 
374
-    * @see Mailcode_Parser_Safeguard::ERROR_INVALID_COMMANDS
375
-    */
371
+    /**
372
+     * @throws Mailcode_Exception
373
+     * 
374
+     * @see Mailcode_Parser_Safeguard::ERROR_INVALID_COMMANDS
375
+     */
376 376
     protected function requireValidCollection() : void
377 377
     {
378 378
         if($this->getCollection()->isValid())
@@ -391,11 +391,11 @@  discard block
 block discarded – undo
391 391
         );
392 392
     }
393 393
     
394
-   /**
395
-    * Retrieves a list of all placeholder IDs used in the text.
396
-    * 
397
-    * @return string[]
398
-    */
394
+    /**
395
+     * Retrieves a list of all placeholder IDs used in the text.
396
+     * 
397
+     * @return string[]
398
+     */
399 399
     public function getPlaceholderStrings() : array
400 400
     {
401 401
         if(is_array($this->placeholderStrings))
@@ -422,13 +422,13 @@  discard block
 block discarded – undo
422 422
         return in_array($subject, $ids);
423 423
     }
424 424
     
425
-   /**
426
-    * Retrieves a placeholder instance by its ID.
427
-    * 
428
-    * @param int $id
429
-    * @throws Mailcode_Exception If the placeholder was not found.
430
-    * @return Mailcode_Parser_Safeguard_Placeholder
431
-    */
425
+    /**
426
+     * Retrieves a placeholder instance by its ID.
427
+     * 
428
+     * @param int $id
429
+     * @throws Mailcode_Exception If the placeholder was not found.
430
+     * @return Mailcode_Parser_Safeguard_Placeholder
431
+     */
432 432
     public function getPlaceholderByID(int $id) : Mailcode_Parser_Safeguard_Placeholder
433 433
     {
434 434
         $placeholders = $this->getPlaceholders();
@@ -451,13 +451,13 @@  discard block
 block discarded – undo
451 451
         );
452 452
     }
453 453
     
454
-   /**
455
-    * Retrieves a placeholder instance by its replacement text.
456
-    * 
457
-    * @param string $string
458
-    * @throws Mailcode_Exception
459
-    * @return Mailcode_Parser_Safeguard_Placeholder
460
-    */
454
+    /**
455
+     * Retrieves a placeholder instance by its replacement text.
456
+     * 
457
+     * @param string $string
458
+     * @throws Mailcode_Exception
459
+     * @return Mailcode_Parser_Safeguard_Placeholder
460
+     */
461 461
     public function getPlaceholderByString(string $string) : Mailcode_Parser_Safeguard_Placeholder
462 462
     {
463 463
         $placeholders = $this->getPlaceholders();
Please login to merge, or discard this patch.