Passed
Push — master ( 0e7983...f091df )
by Sebastian
03:43
created
src/Mailcode/Commands/Command/Comment.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@
 block discarded – undo
20 20
  */
21 21
 class Mailcode_Commands_Command_Comment extends Mailcode_Commands_Command implements Mailcode_Commands_Command_Type_Standalone
22 22
 {
23
-   /**
24
-    * @var string
25
-    */
23
+    /**
24
+     * @var string
25
+     */
26 26
     private $commentString = '';
27 27
     
28 28
     protected function init() : void
Please login to merge, or discard this patch.
src/Mailcode/Factory/Instantiator.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -78,13 +78,13 @@
 block discarded – undo
78 78
         return $this->buildIf($ifType, $this->filterVariableName($variable), 'not-empty');
79 79
     }
80 80
     
81
-   /**
82
-    * @param string $ifType
83
-    * @param string $variable
84
-    * @param string[] $searchTerms
85
-    * @param bool $caseInsensitive
86
-    * @return Mailcode_Commands_IfBase
87
-    */
81
+    /**
82
+     * @param string $ifType
83
+     * @param string $variable
84
+     * @param string[] $searchTerms
85
+     * @param bool $caseInsensitive
86
+     * @return Mailcode_Commands_IfBase
87
+     */
88 88
     public function buildIfContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
89 89
     {
90 90
         $keyword = ' ';
Please login to merge, or discard this patch.
src/Mailcode/Factory/CommandSets/Set/ElseIf.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -104,12 +104,12 @@
 block discarded – undo
104 104
         throw $this->instantiator->exceptionUnexpectedType('ElseIfVarNotEqualsString', $command);
105 105
     }
106 106
     
107
-   /**
108
-    * @param string $variable
109
-    * @param string[] $searchTerms
110
-    * @param bool $caseInsensitive
111
-    * @return Mailcode_Commands_Command_ElseIf_Contains
112
-    */
107
+    /**
108
+     * @param string $variable
109
+     * @param string[] $searchTerms
110
+     * @param bool $caseInsensitive
111
+     * @return Mailcode_Commands_Command_ElseIf_Contains
112
+     */
113 113
     public function elseIfContains(string $variable, array $searchTerms, bool $caseInsensitive=false) : Mailcode_Commands_Command_ElseIf_Contains
114 114
     {
115 115
         $command = $this->instantiator->buildIfContains('ElseIf', $variable, $searchTerms, $caseInsensitive);
Please login to merge, or discard this patch.
src/Mailcode/Factory/CommandSets/Set/If.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -128,12 +128,12 @@
 block discarded – undo
128 128
         throw $this->instantiator->exceptionUnexpectedType('IfNotEmpty', $command);
129 129
     }
130 130
     
131
-   /**
132
-    * @param string $variable
133
-    * @param string[] $searchTerms
134
-    * @param bool $caseInsensitive
135
-    * @return Mailcode_Commands_Command_If_Contains
136
-    */
131
+    /**
132
+     * @param string $variable
133
+     * @param string[] $searchTerms
134
+     * @param bool $caseInsensitive
135
+     * @return Mailcode_Commands_Command_If_Contains
136
+     */
137 137
     public function ifContains(string $variable, array $searchTerms, bool $caseInsensitive=false) : Mailcode_Commands_Command_If_Contains
138 138
     {
139 139
         $command = $this->instantiator->buildIfContains('If', $variable, $searchTerms, $caseInsensitive);
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/ApacheVelocity/Base/AbstractIf.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -117,13 +117,13 @@
 block discarded – undo
117 117
         );
118 118
     }
119 119
     
120
-   /**
121
-    * 
122
-    * @param Mailcode_Variables_Variable $variable
123
-    * @param bool $caseSensitive
124
-    * @param Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral[] $searchTerms
125
-    * @return string
126
-    */
120
+    /**
121
+     * 
122
+     * @param Mailcode_Variables_Variable $variable
123
+     * @param bool $caseSensitive
124
+     * @param Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral[] $searchTerms
125
+     * @return string
126
+     */
127 127
     protected function _translateContains(Mailcode_Variables_Variable $variable, bool $caseSensitive, array $searchTerms) : string
128 128
     {
129 129
         $parts = array();
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/ApacheVelocity.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
  */
21 21
 abstract class Mailcode_Translator_Syntax_ApacheVelocity extends Mailcode_Translator_Command
22 22
 {
23
-   /**
24
-    * @var string[]
25
-    */
23
+    /**
24
+     * @var string[]
25
+     */
26 26
     private $regexSpecialChars = array(
27 27
         '?',
28 28
         '.',
@@ -41,13 +41,13 @@  discard block
 block discarded – undo
41 41
         ')'
42 42
     );
43 43
     
44
-   /**
45
-    * Filters the string for use in an Apache Velocity (Java)
46
-    * regex string: escapes all special characters.
47
-    * 
48
-    * @param string $string
49
-    * @return string
50
-    */
44
+    /**
45
+     * Filters the string for use in an Apache Velocity (Java)
46
+     * regex string: escapes all special characters.
47
+     * 
48
+     * @param string $string
49
+     * @return string
50
+     */
51 51
     protected function filterRegexString(string $string) : string
52 52
     {
53 53
         // Special case: previously escaped quotes. 
Please login to merge, or discard this patch.
src/Mailcode/Parser/Statement/Tokenizer.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 {
24 24
     const ERROR_TOKENIZE_METHOD_MISSING = 49801;
25 25
     
26
-   /**
27
-    * @var string[]
28
-    */
26
+    /**
27
+     * @var string[]
28
+     */
29 29
     protected $operands = array(
30 30
         '==',
31 31
         '<=',
@@ -40,17 +40,17 @@  discard block
 block discarded – undo
40 40
         '<'
41 41
     );
42 42
     
43
-   /**
44
-    * @var string[]
45
-    */
43
+    /**
44
+     * @var string[]
45
+     */
46 46
     protected $keywords = array(
47 47
         'in:',
48 48
         'insensitive:'
49 49
     );
50 50
     
51
-   /**
52
-    * @var string
53
-    */
51
+    /**
52
+     * @var string
53
+     */
54 54
     protected $delimiter = '§§';
55 55
     
56 56
     /**
@@ -67,19 +67,19 @@  discard block
 block discarded – undo
67 67
         'extract_tokens'
68 68
     );
69 69
     
70
-   /**
71
-    * @var Mailcode_Parser_Statement
72
-    */
70
+    /**
71
+     * @var Mailcode_Parser_Statement
72
+     */
73 73
     protected $statement;
74 74
     
75
-   /**
76
-    * @var string
77
-    */
75
+    /**
76
+     * @var string
77
+     */
78 78
     protected $tokenized;
79 79
     
80
-   /**
81
-    * @var Mailcode_Parser_Statement_Tokenizer_Token[]
82
-    */
80
+    /**
81
+     * @var Mailcode_Parser_Statement_Tokenizer_Token[]
82
+     */
83 83
     protected $tokensTemporary = array();
84 84
     
85 85
     /**
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
      */
88 88
     protected $tokensOrdered = array();
89 89
     
90
-   /**
91
-    * @var string[]
92
-    */
90
+    /**
91
+     * @var string[]
92
+     */
93 93
     protected static $ids = array();
94 94
     
95 95
     public function __construct(Mailcode_Parser_Statement $statement)
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
         $this->tokenize($statement->getStatementString());
100 100
     }
101 101
 
102
-   /**
103
-    * Retrieves all tokens detected in the statement string, in 
104
-    * the order they were found.
105
-    * 
106
-    * @return Mailcode_Parser_Statement_Tokenizer_Token[]
107
-    */
102
+    /**
103
+     * Retrieves all tokens detected in the statement string, in 
104
+     * the order they were found.
105
+     * 
106
+     * @return Mailcode_Parser_Statement_Tokenizer_Token[]
107
+     */
108 108
     public function getTokens()
109 109
     {
110 110
         return $this->tokensOrdered;
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
         return !empty($this->tokensOrdered);
116 116
     }
117 117
     
118
-   /**
119
-    * Whether there were any unknown tokens in the statement.
120
-    * 
121
-    * @return bool
122
-    */
118
+    /**
119
+     * Whether there were any unknown tokens in the statement.
120
+     * 
121
+     * @return bool
122
+     */
123 123
     public function hasUnknown() : bool
124 124
     {
125 125
         $unknown = $this->getUnknown();
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
         return !empty($unknown);
128 128
     }
129 129
     
130
-   /**
131
-    * Retrieves all unknown content tokens, if any.
132
-    * 
133
-    * @return \Mailcode\Mailcode_Parser_Statement_Tokenizer_Token_Unknown[]
134
-    */
130
+    /**
131
+     * Retrieves all unknown content tokens, if any.
132
+     * 
133
+     * @return \Mailcode\Mailcode_Parser_Statement_Tokenizer_Token_Unknown[]
134
+     */
135 135
     public function getUnknown()
136 136
     {
137 137
         $result = array();
@@ -201,13 +201,13 @@  discard block
 block discarded – undo
201 201
         }
202 202
     }
203 203
    
204
-   /**
205
-    * Registers a token to add in the statement string.
206
-    * 
207
-    * @param string $type
208
-    * @param string $matchedText
209
-    * @param mixed $subject
210
-    */
204
+    /**
205
+     * Registers a token to add in the statement string.
206
+     * 
207
+     * @param string $type
208
+     * @param string $matchedText
209
+     * @param mixed $subject
210
+     */
211 211
     protected function registerToken(string $type, string $matchedText, $subject=null) : void
212 212
     {
213 213
         $tokenID = $this->generateID();
@@ -236,11 +236,11 @@  discard block
 block discarded – undo
236 236
         return null;
237 237
     }
238 238
     
239
-   /**
240
-    * Some WYSIWYG editors like using pretty quotes instead
241
-    * of the usual double quotes. This simply replaces all
242
-    * occurrences with the regular variant.
243
-    */
239
+    /**
240
+     * Some WYSIWYG editors like using pretty quotes instead
241
+     * of the usual double quotes. This simply replaces all
242
+     * occurrences with the regular variant.
243
+     */
244 244
     protected function tokenize_normalize_quotes() : void
245 245
     {
246 246
         $this->tokenized = str_replace(array('“', '”'), '"', $this->tokenized);
@@ -329,13 +329,13 @@  discard block
 block discarded – undo
329 329
         }
330 330
     }
331 331
     
332
-   /**
333
-    * Generates a unique alphabet-based ID without numbers
334
-    * to use as token name, to avoid conflicts with the
335
-    * numbers detection.
336
-    * 
337
-    * @return string
338
-    */
332
+    /**
333
+     * Generates a unique alphabet-based ID without numbers
334
+     * to use as token name, to avoid conflicts with the
335
+     * numbers detection.
336
+     * 
337
+     * @return string
338
+     */
339 339
     protected function generateID() : string
340 340
     {
341 341
         static $alphas;
Please login to merge, or discard this patch.