Test Failed
Pull Request — master (#13)
by Sebastian
05:15
created
src/Mailcode/Traits/Commands/Validation/Variable.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $var = $this->validator->createVariable();
35 35
         
36
-        if($var->isValid())
36
+        if ($var->isValid())
37 37
         {
38 38
             $this->variableToken = $var->getToken();
39 39
         }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     public function getVariableToken() : Mailcode_Parser_Statement_Tokenizer_Token_Variable
50 50
     {
51
-        if(isset($this->variableToken))
51
+        if (isset($this->variableToken))
52 52
         {
53 53
             return $this->variableToken;
54 54
         }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public function getVariable() : Mailcode_Variables_Variable
70 70
     {
71
-        if(isset($this->variableToken))
71
+        if (isset($this->variableToken))
72 72
         {
73 73
             return $this->variableToken->getVariable();
74 74
         }
@@ -116,12 +116,12 @@  discard block
 block discarded – undo
116 116
     {
117 117
         $parent = $subject->getParent();
118 118
 
119
-        if($parent === null)
119
+        if ($parent === null)
120 120
         {
121 121
             return null;
122 122
         }
123 123
 
124
-        if($parent instanceof Mailcode_Commands_Command_For)
124
+        if ($parent instanceof Mailcode_Commands_Command_For)
125 125
         {
126 126
             return $parent;
127 127
         }
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Validation/CaseSensitive.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         
43 43
         $this->caseInsensitive = $val->isValid();
44 44
         
45
-        if($val->isValid())
45
+        if ($val->isValid())
46 46
         {
47 47
             $this->regexToken = $val->getToken();
48 48
         }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     
56 56
     public function getCaseToken() : ?Mailcode_Parser_Statement_Tokenizer_Token_Keyword
57 57
     {
58
-        if($this->regexToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
58
+        if ($this->regexToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
59 59
         {
60 60
             return $this->regexToken;
61 61
         }
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Validation/RegexEnabled.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
         $this->regexEnabled = $val->isValid();
44 44
 
45
-        if($val->isValid())
45
+        if ($val->isValid())
46 46
         {
47 47
             $this->regexToken = $val->getToken();
48 48
         }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function getRegexToken() : ?Mailcode_Parser_Statement_Tokenizer_Token_Keyword
57 57
     {
58
-        if($this->regexToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
58
+        if ($this->regexToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
59 59
         {
60 60
             return $this->regexToken;
61 61
         }
Please login to merge, or discard this patch.
src/Mailcode/Parser/Statement/Validator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,11 +74,11 @@
 block discarded – undo
74 74
         return new Mailcode_Parser_Statement_Validator_Type_Value($this->statement);
75 75
     }
76 76
     
77
-    public function createOperand(string $sign='') : Mailcode_Parser_Statement_Validator_Type_Operand
77
+    public function createOperand(string $sign = '') : Mailcode_Parser_Statement_Validator_Type_Operand
78 78
     {
79 79
         $validate = new Mailcode_Parser_Statement_Validator_Type_Operand($this->statement);
80 80
         
81
-        if(!empty($sign))
81
+        if (!empty($sign))
82 82
         {
83 83
             $validate->setOperandSign($sign);
84 84
         }
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Validation/Multiline.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         
43 43
         $this->multiline = $val->isValid();
44 44
         
45
-        if($val->isValid())
45
+        if ($val->isValid())
46 46
         {
47 47
             $this->multilineToken = $val->getToken();
48 48
         }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     
56 56
     public function getMultilineToken() : ?Mailcode_Parser_Statement_Tokenizer_Token_Keyword
57 57
     {
58
-        if($this->multilineToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
58
+        if ($this->multilineToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Keyword)
59 59
         {
60 60
             return $this->multilineToken;
61 61
         }
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Validation/ParseParams.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
             $this
42 42
         );
43 43
 
44
-        if(!$this->params->isValid() && $this->requiresParameters())
44
+        if (!$this->params->isValid() && $this->requiresParameters())
45 45
         {
46 46
             $error = $this->params->getValidationResult();
47 47
 
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Type/Sibling.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,15 +40,15 @@
 block discarded – undo
40 40
     {
41 41
         $opening = $this->getOpeningCommand();
42 42
 
43
-        if($opening === null) {
43
+        if ($opening === null) {
44 44
             return array();
45 45
         }
46 46
 
47 47
         $siblings = $opening->getSiblingCommands();
48 48
         $result = array();
49
-        foreach($siblings as $sibling)
49
+        foreach ($siblings as $sibling)
50 50
         {
51
-            if($sibling !== $this) {
51
+            if ($sibling !== $this) {
52 52
                 $result[] = $sibling;
53 53
             }
54 54
         }
Please login to merge, or discard this patch.
src/Mailcode/Collection/NestingValidator.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
         
61 61
         $commands = $this->collection->getCommands();
62 62
         
63
-        foreach($commands as $command)
63
+        foreach ($commands as $command)
64 64
         {
65 65
             $method = 'validate_'.$command->getCommandType();
66 66
             
67
-            if(!method_exists($this, $method))
67
+            if (!method_exists($this, $method))
68 68
             {
69 69
                 throw new Mailcode_Exception(
70 70
                     'Unknown command type validation method.',
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
             
80 80
             $this->$method($command);
81 81
             
82
-            if(!$this->validationResult->isValid())
82
+            if (!$this->validationResult->isValid())
83 83
             {
84 84
                 break;
85 85
             }
86 86
         }
87 87
         
88
-        if($this->validationResult->isValid())
88
+        if ($this->validationResult->isValid())
89 89
         {
90 90
             $this->validate_Unclosed();
91 91
         }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     {
98 98
         $leftover = $this->getOpenCommand();
99 99
         
100
-        if($leftover === null)
100
+        if ($leftover === null)
101 101
         {
102 102
             return;
103 103
         }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     
114 114
     protected function getOpenCommand() : ?Mailcode_Commands_Command_Type_Opening
115 115
     {
116
-        if(empty($this->stack))
116
+        if (empty($this->stack))
117 117
         {
118 118
             return null;
119 119
         }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         
125 125
         $cmd = $this->stack[$idx];
126 126
         
127
-        if($cmd instanceof Mailcode_Commands_Command_Type_Opening)
127
+        if ($cmd instanceof Mailcode_Commands_Command_Type_Opening)
128 128
         {
129 129
             return $cmd;
130 130
         }
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     {
149 149
         $parent = $this->getOpenCommand();
150 150
         
151
-        if($parent === null)
151
+        if ($parent === null)
152 152
         {
153 153
             $this->validationResult->makeError(
154 154
                 t(
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             return;
163 163
         }
164 164
         
165
-        if($parent->getName() !== $command->getParentName())
165
+        if ($parent->getName() !== $command->getParentName())
166 166
         {
167 167
             $this->validationResult->makeError(
168 168
                 t(
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     
185 185
     protected function validate_Closing(Mailcode_Commands_Command_Type_Closing $command) : void
186 186
     {
187
-        if(empty($this->stack))
187
+        if (empty($this->stack))
188 188
         {
189 189
             $this->validationResult->makeError(
190 190
                 t('All open commands have already been ended.'),
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         
197 197
         $openingCommand = array_pop($this->stack);
198 198
 
199
-        if($openingCommand instanceof Mailcode_Commands_Command_Type_Opening)
199
+        if ($openingCommand instanceof Mailcode_Commands_Command_Type_Opening)
200 200
         {
201 201
             $this->log(sprintf('Closing command %s', $openingCommand->getName()));
202 202
 
Please login to merge, or discard this patch.
src/Mailcode/Parser/Safeguard/Formatter/Type/PreProcessing.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,16 +25,16 @@
 block discarded – undo
25 25
     {
26 26
         $command = $location->getPlaceholder()->getCommand();
27 27
 
28
-        if($command instanceof Mailcode_Interfaces_Commands_PreProcessing)
28
+        if ($command instanceof Mailcode_Interfaces_Commands_PreProcessing)
29 29
         {
30 30
             return $command->preProcessOpening();
31 31
         }
32 32
 
33
-        if($command instanceof Mailcode_Commands_Command_Type_Closing)
33
+        if ($command instanceof Mailcode_Commands_Command_Type_Closing)
34 34
         {
35 35
             $opening = $command->getOpeningCommand();
36 36
 
37
-            if($opening instanceof Mailcode_Interfaces_Commands_PreProcessing) {
37
+            if ($opening instanceof Mailcode_Interfaces_Commands_PreProcessing) {
38 38
                 return $opening->preProcessClosing();
39 39
             }
40 40
         }
Please login to merge, or discard this patch.