Passed
Push — master ( 02717f...9ffab7 )
by Sebastian
03:24
created
src/Mailcode/Translator/Syntax/ApacheVelocity/Contains/StatementBuilder.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function getSign() : string
86 86
     {
87
-        if($this->isNotContains())
87
+        if ($this->isNotContains())
88 88
         {
89 89
             return '!';
90 90
         }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function getConnector()
103 103
     {
104
-        if($this->isNotContains())
104
+        if ($this->isNotContains())
105 105
         {
106 106
             return '&&';
107 107
         }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     {
118 118
         $parts = array();
119 119
 
120
-        foreach($this->searchTerms as $token)
120
+        foreach ($this->searchTerms as $token)
121 121
         {
122 122
             $parts[] = $this->renderCommand($token);
123 123
         }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     private function renderCommand(Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral $searchTerm) : string
134 134
     {
135
-        if($this->isList())
135
+        if ($this->isList())
136 136
         {
137 137
             $command = $this->renderListCommand($searchTerm);
138 138
         }
@@ -173,14 +173,14 @@  discard block
 block discarded – undo
173 173
     private function renderRegex(Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral $searchTerm) : string
174 174
     {
175 175
         $opts = 's';
176
-        if($this->caseSensitive)
176
+        if ($this->caseSensitive)
177 177
         {
178 178
             $opts = 'is';
179 179
         }
180 180
 
181 181
         $filtered = trim($searchTerm->getNormalized(), '"');
182 182
 
183
-        if(!$this->regexEnabled)
183
+        if (!$this->regexEnabled)
184 184
         {
185 185
             $filtered = $this->translator->filterRegexString($filtered);
186 186
             $filtered = $this->addWildcards($filtered);
@@ -203,12 +203,12 @@  discard block
 block discarded – undo
203 203
      */
204 204
     private function addWildcards(string $searchTerm) : string
205 205
     {
206
-        if($this->containsType === 'list-begins-with')
206
+        if ($this->containsType === 'list-begins-with')
207 207
         {
208 208
             return $searchTerm.'.*';
209 209
         }
210 210
 
211
-        if($this->containsType === 'list-ends-with')
211
+        if ($this->containsType === 'list-ends-with')
212 212
         {
213 213
             return '.*'.$searchTerm;
214 214
         }
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      {
225 225
          $tokens = explode('.', ltrim($this->variable->getFullName(), '$'));
226 226
 
227
-         if(count($tokens) === 2)
227
+         if (count($tokens) === 2)
228 228
          {
229 229
              return array(
230 230
                  'path' => $tokens[0],
Please login to merge, or discard this patch.