Passed
Push — master ( f87868...1b5df6 )
by Sebastian
02:44
created
src/Mailcode/Collection.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         
100 100
         $errors = $this->errors;
101 101
         
102
-        if(!$result->isValid())
102
+        if (!$result->isValid())
103 103
         {
104 104
             $errors[] = new Mailcode_Collection_Error_Message(
105 105
                 '',
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     {
116 116
         $errors = $this->getErrors();
117 117
         
118
-        if(!empty($errors))
118
+        if (!empty($errors))
119 119
         {
120 120
             return array_shift($errors);
121 121
         }
@@ -157,11 +157,11 @@  discard block
 block discarded – undo
157 157
     {
158 158
         $hashes = array();
159 159
         
160
-        foreach($this->commands as $command)
160
+        foreach ($this->commands as $command)
161 161
         {
162 162
             $hash = $command->getHash();
163 163
             
164
-            if(!isset($hashes[$hash]))
164
+            if (!isset($hashes[$hash]))
165 165
             {
166 166
                 $hashes[$hash] = $command;
167 167
             }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     */
179 179
     public function addCommands(array $commands) : Mailcode_Collection
180 180
     {
181
-        foreach($commands as $command)
181
+        foreach ($commands as $command)
182 182
         {
183 183
             $this->addCommand($command);
184 184
         }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
     {
198 198
         $collection = new Mailcode_Variables_Collection_Regular();
199 199
         
200
-        foreach($this->commands as $command)
200
+        foreach ($this->commands as $command)
201 201
         {
202 202
             $collection->mergeWith($command->getVariables());
203 203
         }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     
208 208
     public function getValidationResult() : OperationResult
209 209
     {
210
-        if(isset($this->validationResult))
210
+        if (isset($this->validationResult))
211 211
         {
212 212
             return $this->validationResult;
213 213
         }
@@ -223,9 +223,9 @@  discard block
 block discarded – undo
223 223
     {
224 224
         $errors = $this->getErrors();
225 225
         
226
-        foreach($errors as $error)
226
+        foreach ($errors as $error)
227 227
         {
228
-            if($error->getCode() === $code)
228
+            if ($error->getCode() === $code)
229 229
             {
230 230
                 return true;
231 231
             }
@@ -243,9 +243,9 @@  discard block
 block discarded – undo
243 243
     {
244 244
         $result = array();
245 245
         
246
-        foreach($this->commands as $command)
246
+        foreach ($this->commands as $command)
247 247
         {
248
-            if($command instanceof Mailcode_Commands_Command_ShowVariable)
248
+            if ($command instanceof Mailcode_Commands_Command_ShowVariable)
249 249
             {
250 250
                 $result[] = $command;
251 251
             }
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
     {
259 259
         $commands = $this->getCommands();
260 260
         
261
-        if(!empty($commands))
261
+        if (!empty($commands))
262 262
         {
263 263
             return array_shift($commands);
264 264
         }
Please login to merge, or discard this patch.
src/Mailcode/Commands/Highlighter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
     {
52 52
         $this->parts[] = $this->renderTag(array('command-name'), $this->command->getName());
53 53
         
54
-        if($this->command->hasType())
54
+        if ($this->command->hasType())
55 55
         {
56 56
             $this->parts[] = ' '.$this->renderTag(array('command-type'), $this->command->getType());
57 57
         }
58 58
         
59
-        if($this->command->requiresParameters())
59
+        if ($this->command->requiresParameters())
60 60
         {
61 61
             $this->parts[] = $this->renderTag(array('hyphen'), ':');
62 62
             $this->parts[] = '<wbr>';
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     
66 66
     protected function appendParams() : void
67 67
     {
68
-        if($this->command->hasParameters())
68
+        if ($this->command->hasParameters())
69 69
         {
70 70
             $this->parts[] = ' '.$this->renderTag(array('params'), $this->command->getParamsString());
71 71
         }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     {
81 81
         $parts = array();
82 82
         
83
-        foreach($classes as $class)
83
+        foreach ($classes as $class)
84 84
         {
85 85
             $parts[] = 'mailcode-'.$class;
86 86
         }
Please login to merge, or discard this patch.