Passed
Push — master ( 827600...d1e019 )
by Sebastian
04:24
created
src/Mailcode/Traits/Commands/Validation/CaseSensitive.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         
41 41
         $this->caseInsensitive = $val->isValid();
42 42
         
43
-        if($val->isValid())
43
+        if ($val->isValid())
44 44
         {
45 45
             $this->caseToken = $val->getToken();
46 46
         }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     
54 54
     public function getCaseToken() : ?Mailcode_Parser_Statement_Tokenizer_Token_Keyword
55 55
     {
56
-        if($this->caseToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
56
+        if ($this->caseToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
57 57
         {
58 58
             return $this->caseToken;
59 59
         }
Please login to merge, or discard this patch.
src/Mailcode/Commands/Command/Comment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
     
81 81
     protected function validateSyntax_comment() : void
82 82
     {
83
-        if(empty($this->commentString))
83
+        if (empty($this->commentString))
84 84
         {
85 85
             $this->validationResult->makeError(
86 86
                 t('The comment text ist empty.'),
Please login to merge, or discard this patch.
src/Mailcode/Factory/Instantiator.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@  discard block
 block discarded – undo
20 20
  */
21 21
 class Mailcode_Factory_Instantiator
22 22
 {
23
-    public function buildIf(string $ifType, string $params, string $type='') : Mailcode_Commands_IfBase
23
+    public function buildIf(string $ifType, string $params, string $type = '') : Mailcode_Commands_IfBase
24 24
     {
25 25
         $stringType = $type;
26 26
         
27
-        if(!empty($type))
27
+        if (!empty($type))
28 28
         {
29 29
             $stringType = ' '.$type;
30 30
         }
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         
44 44
         $this->checkCommand($command);
45 45
         
46
-        if($command instanceof Mailcode_Commands_IfBase)
46
+        if ($command instanceof Mailcode_Commands_IfBase)
47 47
         {
48 48
             return $command;
49 49
         }
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
         throw $this->exceptionUnexpectedType('IfBase', $command);
52 52
     }
53 53
     
54
-    public function buildIfVar(string $ifType, string $variable, string $operand, string $value, bool $quoteValue=false) : Mailcode_Commands_IfBase
54
+    public function buildIfVar(string $ifType, string $variable, string $operand, string $value, bool $quoteValue = false) : Mailcode_Commands_IfBase
55 55
     {
56
-        if($quoteValue)
56
+        if ($quoteValue)
57 57
         {
58 58
             $value = $this->quoteString($value);
59 59
         }
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
     * @param bool $caseInsensitive
86 86
     * @return Mailcode_Commands_IfBase
87 87
     */
88
-    public function buildIfContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
88
+    public function buildIfContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive = false) : Mailcode_Commands_IfBase
89 89
     {
90 90
         $keyword = ' ';
91 91
         
92
-        if($caseInsensitive)
92
+        if ($caseInsensitive)
93 93
         {
94 94
             $keyword = ' insensitive: ';
95 95
         }
@@ -104,21 +104,21 @@  discard block
 block discarded – undo
104 104
         return $this->buildIf($ifType, $condition, 'contains');
105 105
     }
106 106
     
107
-    public function buildIfBeginsWith(string $ifType, string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
107
+    public function buildIfBeginsWith(string $ifType, string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_IfBase
108 108
     {
109 109
         return $this->buildIfSearch($ifType, 'begins-with', $variable, $search, $caseInsensitive);
110 110
     }
111 111
     
112
-    public function buildIfEndsWith(string $ifType, string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
112
+    public function buildIfEndsWith(string $ifType, string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_IfBase
113 113
     {
114 114
         return $this->buildIfSearch($ifType, 'ends-with', $variable, $search, $caseInsensitive);
115 115
     }
116 116
     
117
-    private function buildIfSearch(string $ifType, string $subType, string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
117
+    private function buildIfSearch(string $ifType, string $subType, string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_IfBase
118 118
     {
119 119
         $keyword = ' ';
120 120
         
121
-        if($caseInsensitive)
121
+        if ($caseInsensitive)
122 122
         {
123 123
             $keyword = ' insensitive: ';
124 124
         }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     
148 148
     public function checkCommand(Mailcode_Commands_Command $command) : void
149 149
     {
150
-        if($command->isValid())
150
+        if ($command->isValid())
151 151
         {
152 152
             return;
153 153
         }
Please login to merge, or discard this patch.
src/Mailcode/Factory/CommandSets/Set/ElseIf.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@  discard block
 block discarded – undo
20 20
  */
21 21
 class Mailcode_Factory_CommandSets_Set_ElseIf extends Mailcode_Factory_CommandSets_IfBase
22 22
 {
23
-    public function elseIf(string $condition, string $type='') : Mailcode_Commands_Command_ElseIf
23
+    public function elseIf (string $condition, string $type = '') : Mailcode_Commands_Command_ElseIf
24 24
     {
25 25
         $command = $this->instantiator->buildIf('ElseIf', $condition, $type);
26 26
         
27
-        if($command instanceof Mailcode_Commands_Command_ElseIf)
27
+        if ($command instanceof Mailcode_Commands_Command_ElseIf)
28 28
         {
29 29
             return $command;
30 30
         }
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
         throw $this->instantiator->exceptionUnexpectedType('ElseIf', $command);
33 33
     }
34 34
     
35
-    public function elseIfVar(string $variable, string $operand, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_ElseIf_Variable
35
+    public function elseIfVar(string $variable, string $operand, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_ElseIf_Variable
36 36
     {
37 37
         $command = $this->instantiator->buildIfVar('ElseIf', $variable, $operand, $value, $quoteValue);
38 38
         
39
-        if($command instanceof Mailcode_Commands_Command_ElseIf_Variable)
39
+        if ($command instanceof Mailcode_Commands_Command_ElseIf_Variable)
40 40
         {
41 41
             return $command;
42 42
         }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $command = $this->instantiator->buildIfVar('ElseIf', $variable, $operand, $value, true);
50 50
         
51
-        if($command instanceof Mailcode_Commands_Command_ElseIf_Variable)
51
+        if ($command instanceof Mailcode_Commands_Command_ElseIf_Variable)
52 52
         {
53 53
             return $command;
54 54
         }
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
         throw $this->instantiator->exceptionUnexpectedType('ElseIfVarString', $command);
57 57
     }
58 58
     
59
-    public function elseIfVarEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_ElseIf_Variable
59
+    public function elseIfVarEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_ElseIf_Variable
60 60
     {
61 61
         $command = $this->instantiator->buildIfVar('ElseIf', $variable, '==', $value, $quoteValue);
62 62
         
63
-        if($command instanceof Mailcode_Commands_Command_ElseIf_Variable)
63
+        if ($command instanceof Mailcode_Commands_Command_ElseIf_Variable)
64 64
         {
65 65
             return $command;
66 66
         }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     {
73 73
         $command = $this->instantiator->buildIfVar('ElseIf', $variable, '==', $value, true);
74 74
         
75
-        if($command instanceof Mailcode_Commands_Command_ElseIf_Variable)
75
+        if ($command instanceof Mailcode_Commands_Command_ElseIf_Variable)
76 76
         {
77 77
             return $command;
78 78
         }
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
         throw $this->instantiator->exceptionUnexpectedType('ElseIfVarEqualsString', $command);
81 81
     }
82 82
     
83
-    public function elseIfVarNotEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_ElseIf_Variable
83
+    public function elseIfVarNotEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_ElseIf_Variable
84 84
     {
85 85
         $command = $this->instantiator->buildIfVar('ElseIf', $variable, '!=', $value, $quoteValue);
86 86
         
87
-        if($command instanceof Mailcode_Commands_Command_ElseIf_Variable)
87
+        if ($command instanceof Mailcode_Commands_Command_ElseIf_Variable)
88 88
         {
89 89
             return $command;
90 90
         }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     {
97 97
         $command = $this->instantiator->buildIfVar('ElseIf', $variable, '!=', $value, true);
98 98
         
99
-        if($command instanceof Mailcode_Commands_Command_ElseIf_Variable)
99
+        if ($command instanceof Mailcode_Commands_Command_ElseIf_Variable)
100 100
         {
101 101
             return $command;
102 102
         }
@@ -110,11 +110,11 @@  discard block
 block discarded – undo
110 110
     * @param bool $caseInsensitive
111 111
     * @return Mailcode_Commands_Command_ElseIf_Contains
112 112
     */
113
-    public function elseIfContains(string $variable, array $searchTerms, bool $caseInsensitive=false) : Mailcode_Commands_Command_ElseIf_Contains
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);
116 116
         
117
-        if($command instanceof Mailcode_Commands_Command_ElseIf_Contains)
117
+        if ($command instanceof Mailcode_Commands_Command_ElseIf_Contains)
118 118
         {
119 119
             return $command;
120 120
         }
@@ -122,11 +122,11 @@  discard block
 block discarded – undo
122 122
         throw $this->instantiator->exceptionUnexpectedType('ElseIfContains', $command);
123 123
     }
124 124
     
125
-    public function elseIfBeginsWith(string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_Command_ElseIf_BeginsWith
125
+    public function elseIfBeginsWith(string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_Command_ElseIf_BeginsWith
126 126
     {
127 127
         $command = $this->instantiator->buildIfBeginsWith('ElseIf', $variable, $search, $caseInsensitive);
128 128
         
129
-        if($command instanceof Mailcode_Commands_Command_ElseIf_BeginsWith)
129
+        if ($command instanceof Mailcode_Commands_Command_ElseIf_BeginsWith)
130 130
         {
131 131
             return $command;
132 132
         }
@@ -134,11 +134,11 @@  discard block
 block discarded – undo
134 134
         throw $this->instantiator->exceptionUnexpectedType('ElseIfBeginsWith', $command);
135 135
     }
136 136
     
137
-    public function elseIfEndsWith(string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_Command_ElseIf_EndsWith
137
+    public function elseIfEndsWith(string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_Command_ElseIf_EndsWith
138 138
     {
139 139
         $command = $this->instantiator->buildIfEndsWith('ElseIf', $variable, $search, $caseInsensitive);
140 140
         
141
-        if($command instanceof Mailcode_Commands_Command_ElseIf_EndsWith)
141
+        if ($command instanceof Mailcode_Commands_Command_ElseIf_EndsWith)
142 142
         {
143 143
             return $command;
144 144
         }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     {
151 151
         $command = $this->instantiator->buildIfEmpty('ElseIf', $variable);
152 152
         
153
-        if($command instanceof Mailcode_Commands_Command_ElseIf_Empty)
153
+        if ($command instanceof Mailcode_Commands_Command_ElseIf_Empty)
154 154
         {
155 155
             return $command;
156 156
         }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     {
163 163
         $command = $this->instantiator->buildIfNotEmpty('ElseIf', $variable);
164 164
         
165
-        if($command instanceof Mailcode_Commands_Command_ElseIf_NotEmpty)
165
+        if ($command instanceof Mailcode_Commands_Command_ElseIf_NotEmpty)
166 166
         {
167 167
             return $command;
168 168
         }
Please login to merge, or discard this patch.
src/Mailcode/Factory/CommandSets/Set/If.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -20,11 +20,11 @@  discard block
 block discarded – undo
20 20
  */
21 21
 class Mailcode_Factory_CommandSets_Set_If extends Mailcode_Factory_CommandSets_IfBase
22 22
 {
23
-    public function if(string $condition, string $type='') : Mailcode_Commands_Command_If
23
+    public function if (string $condition, string $type = '') : Mailcode_Commands_Command_If
24 24
     {
25 25
         $command = $this->instantiator->buildIf('If', $condition, $type);
26 26
         
27
-        if($command instanceof Mailcode_Commands_Command_If)
27
+        if ($command instanceof Mailcode_Commands_Command_If)
28 28
         {
29 29
             return $command;
30 30
         }
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
         throw $this->instantiator->exceptionUnexpectedType('If', $command);
33 33
     }
34 34
     
35
-    public function ifVar(string $variable, string $operand, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_If_Variable
35
+    public function ifVar(string $variable, string $operand, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_If_Variable
36 36
     {
37 37
         $command = $this->instantiator->buildIfVar('If', $variable, $operand, $value, $quoteValue);
38 38
         
39
-        if($command instanceof Mailcode_Commands_Command_If_Variable)
39
+        if ($command instanceof Mailcode_Commands_Command_If_Variable)
40 40
         {
41 41
             return $command;
42 42
         }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $command = $this->instantiator->buildIfVar('If', $variable, $operand, $value, true);
50 50
         
51
-        if($command instanceof Mailcode_Commands_Command_If_Variable)
51
+        if ($command instanceof Mailcode_Commands_Command_If_Variable)
52 52
         {
53 53
             return $command;
54 54
         }
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
         throw $this->instantiator->exceptionUnexpectedType('IfVarString', $command);
57 57
     }
58 58
     
59
-    public function ifVarEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_If_Variable
59
+    public function ifVarEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_If_Variable
60 60
     {
61 61
         $command = $this->instantiator->buildIfVar('If', $variable, '==', $value, $quoteValue);
62 62
         
63
-        if($command instanceof Mailcode_Commands_Command_If_Variable)
63
+        if ($command instanceof Mailcode_Commands_Command_If_Variable)
64 64
         {
65 65
             return $command;
66 66
         }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     {
73 73
         $command = $this->instantiator->buildIfVar('If', $variable, '==', $value, true);
74 74
         
75
-        if($command instanceof Mailcode_Commands_Command_If_Variable)
75
+        if ($command instanceof Mailcode_Commands_Command_If_Variable)
76 76
         {
77 77
             return $command;
78 78
         }
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
         throw $this->instantiator->exceptionUnexpectedType('IfarEqualsString', $command);
81 81
     }
82 82
     
83
-    public function ifVarNotEquals(string $variable, string $value, bool $quoteValue=false) : Mailcode_Commands_Command_If_Variable
83
+    public function ifVarNotEquals(string $variable, string $value, bool $quoteValue = false) : Mailcode_Commands_Command_If_Variable
84 84
     {
85 85
         $command = $this->instantiator->buildIfVar('If', $variable, '!=', $value, $quoteValue);
86 86
         
87
-        if($command instanceof Mailcode_Commands_Command_If_Variable)
87
+        if ($command instanceof Mailcode_Commands_Command_If_Variable)
88 88
         {
89 89
             return $command;
90 90
         }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     {
97 97
         $command = $this->instantiator->buildIfVar('If', $variable, '!=', $value, true);
98 98
         
99
-        if($command instanceof Mailcode_Commands_Command_If_Variable)
99
+        if ($command instanceof Mailcode_Commands_Command_If_Variable)
100 100
         {
101 101
             return $command;
102 102
         }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     {
109 109
         $command = $this->instantiator->buildIfEmpty('If', $variable);
110 110
         
111
-        if($command instanceof Mailcode_Commands_Command_If_Empty)
111
+        if ($command instanceof Mailcode_Commands_Command_If_Empty)
112 112
         {
113 113
             return $command;
114 114
         }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     {
121 121
         $command = $this->instantiator->buildIfNotEmpty('If', $variable);
122 122
         
123
-        if($command instanceof Mailcode_Commands_Command_If_NotEmpty)
123
+        if ($command instanceof Mailcode_Commands_Command_If_NotEmpty)
124 124
         {
125 125
             return $command;
126 126
         }
@@ -134,11 +134,11 @@  discard block
 block discarded – undo
134 134
     * @param bool $caseInsensitive
135 135
     * @return Mailcode_Commands_Command_If_Contains
136 136
     */
137
-    public function ifContains(string $variable, array $searchTerms, bool $caseInsensitive=false) : Mailcode_Commands_Command_If_Contains
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);
140 140
         
141
-        if($command instanceof Mailcode_Commands_Command_If_Contains)
141
+        if ($command instanceof Mailcode_Commands_Command_If_Contains)
142 142
         {
143 143
             return $command;
144 144
         }
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
         throw $this->instantiator->exceptionUnexpectedType('IfContains', $command);
147 147
     }
148 148
     
149
-    public function ifBeginsWith(string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_Command_If_BeginsWith
149
+    public function ifBeginsWith(string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_Command_If_BeginsWith
150 150
     {
151 151
         $command = $this->instantiator->buildIfBeginsWith('If', $variable, $search, $caseInsensitive);
152 152
         
153
-        if($command instanceof Mailcode_Commands_Command_If_BeginsWith)
153
+        if ($command instanceof Mailcode_Commands_Command_If_BeginsWith)
154 154
         {
155 155
             return $command;
156 156
         }
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
         throw $this->instantiator->exceptionUnexpectedType('IfBeginsWith', $command);
159 159
     }
160 160
     
161
-    public function ifEndsWith(string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_Command_If_EndsWith
161
+    public function ifEndsWith(string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_Command_If_EndsWith
162 162
     {
163 163
         $command = $this->instantiator->buildIfEndsWith('If', $variable, $search, $caseInsensitive);
164 164
         
165
-        if($command instanceof Mailcode_Commands_Command_If_EndsWith)
165
+        if ($command instanceof Mailcode_Commands_Command_If_EndsWith)
166 166
         {
167 167
             return $command;
168 168
         }
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/ApacheVelocity/Base/AbstractIf.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
         
34 34
         $keywords = $command->getLogicKeywords()->getKeywords();
35 35
         
36
-        foreach($keywords as $keyword)
36
+        foreach ($keywords as $keyword)
37 37
         {
38 38
             $keyCommand = $keyword->getCommand();
39 39
             
40
-            if($keyCommand instanceof Mailcode_Commands_IfBase)
40
+            if ($keyCommand instanceof Mailcode_Commands_IfBase)
41 41
             {
42 42
                 $body .= ' '.$this->getSign($keyword).' '.$this->translateBody($keyCommand);
43 43
             }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     
61 61
     protected function getSign(Mailcode_Commands_LogicKeywords_Keyword $keyword) : string
62 62
     {
63
-        switch($keyword->getName())
63
+        switch ($keyword->getName())
64 64
         {
65 65
             case 'and':
66 66
                 return '&&';
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     {
84 84
         $sign = '';
85 85
         
86
-        if($notEmpty)
86
+        if ($notEmpty)
87 87
         {
88 88
             $sign = '!';
89 89
         }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         $params = $command->getParams();
101 101
         
102
-        if(!$params)
102
+        if (!$params)
103 103
         {
104 104
             return '';
105 105
         }
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
         $varName = $variable->getFullName();
131 131
 
132 132
         $opts = 's';
133
-        if($caseSensitive)
133
+        if ($caseSensitive)
134 134
         {
135 135
             $opts = 'is';
136 136
         }
137 137
         
138
-        foreach($searchTerms as $token)
138
+        foreach ($searchTerms as $token)
139 139
         {
140 140
             $parts[] = sprintf(
141 141
                 '%s.matches("(?%s)%s")',
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
     protected function _translateSearch(string $mode, Mailcode_Variables_Variable $variable, bool $caseSensitive, string $searchTerm) : string
152 152
     {
153 153
         $method = $mode.'With';
154
-        if($caseSensitive)
154
+        if ($caseSensitive)
155 155
         {
156 156
             $method = $mode.'WithIgnoreCase';
157 157
         }
Please login to merge, or discard this patch.
src/Mailcode/Translator/Syntax/ApacheVelocity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         
62 62
         // All other special characters have to be escaped
63 63
         // with two backslashes. 
64
-        foreach($this->regexSpecialChars as $char)
64
+        foreach ($this->regexSpecialChars as $char)
65 65
         {
66 66
             $string = str_replace($char, '\\\\'.$char, $string);
67 67
         }
Please login to merge, or discard this patch.
src/Mailcode/Commands/Command/SetVariable.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     {
74 74
         $val = $this->validator->createVariable()->setIndex(0);
75 75
         
76
-        if($val->isValid())
76
+        if ($val->isValid())
77 77
         {
78 78
             $this->variableToken = $val->getToken();
79 79
         }
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $tokens = $this->params->getInfo()->createPruner()->limitToOperands()->getTokens();
92 92
 
93
-        foreach($tokens as $token)
93
+        foreach ($tokens as $token)
94 94
         {
95
-            if($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand)
95
+            if ($token instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand)
96 96
             {
97 97
                 $this->validateOperand($token);
98 98
             }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         
109 109
         // ensure that the operand we have in the command is one of the
110 110
         // allowed ones.
111
-        if(!in_array($sign, $allowed))
111
+        if (!in_array($sign, $allowed))
112 112
         {
113 113
             $this->validationResult->makeError(
114 114
                 t('The %1$s sign is not allowed in this command.', '<code>'.$sign.'</code>'),
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     {
122 122
         $tokens = $this->getAssignmentTokens();
123 123
         
124
-        if(empty($tokens))
124
+        if (empty($tokens))
125 125
         {
126 126
             $this->validationResult->makeError(
127 127
                 t('No value assigned to the variable.'),
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     
133 133
     public function getVariable() : Mailcode_Variables_Variable
134 134
     {
135
-        if($this->variableToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable)
135
+        if ($this->variableToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable)
136 136
         {
137 137
             return $this->variableToken->getVariable();
138 138
         }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         $eq = array_shift($params); // equals sign
157 157
         
158 158
         // in case the equals sign was omitted.
159
-        if(!$eq instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand)
159
+        if (!$eq instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand)
160 160
         {
161 161
             array_unshift($params, $eq);
162 162
         }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         
171 171
         $items = array();
172 172
         
173
-        foreach($tokens as $token)
173
+        foreach ($tokens as $token)
174 174
         {
175 175
             $items[] = $token->getNormalized();
176 176
         }
Please login to merge, or discard this patch.
src/Mailcode/Factory/CommandSets/Set/Misc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     
35 35
         $this->instantiator->checkCommand($cmd);
36 36
         
37
-        if($cmd instanceof Mailcode_Commands_Command_Comment)
37
+        if ($cmd instanceof Mailcode_Commands_Command_Comment)
38 38
         {
39 39
             return $cmd;
40 40
         }
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         throw $this->instantiator->exceptionUnexpectedType('Comment', $cmd);
43 43
     }
44 44
     
45
-    public function for(string $sourceVariable, string $loopVariable) : Mailcode_Commands_Command_For
45
+    public function for (string $sourceVariable, string $loopVariable) : Mailcode_Commands_Command_For
46 46
     {
47 47
         $sourceVariable = '$'.ltrim($sourceVariable, '$');
48 48
         $loopVariable = '$'.ltrim($loopVariable, '$');
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         
65 65
         $this->instantiator->checkCommand($cmd);
66 66
         
67
-        if($cmd instanceof Mailcode_Commands_Command_For)
67
+        if ($cmd instanceof Mailcode_Commands_Command_For)
68 68
         {
69 69
             return $cmd;
70 70
         }
Please login to merge, or discard this patch.