Passed
Push — master ( 1515ff...7c0b30 )
by Sebastian
04:21
created
src/Mailcode/Factory/Instantiator.php 1 patch
Spacing   +11 added lines, -11 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
         }
@@ -78,26 +78,26 @@  discard block
 block discarded – undo
78 78
         return $this->buildIf($ifType, $this->filterVariableName($variable), 'not-empty');
79 79
     }
80 80
     
81
-    public function buildIfContains(string $ifType, string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
81
+    public function buildIfContains(string $ifType, string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_IfBase
82 82
     {
83 83
         return $this->buildIfSearch($ifType, 'contains', $variable, $search, $caseInsensitive);
84 84
     }
85 85
     
86
-    public function buildIfBeginsWith(string $ifType, string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
86
+    public function buildIfBeginsWith(string $ifType, string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_IfBase
87 87
     {
88 88
         return $this->buildIfSearch($ifType, 'begins-with', $variable, $search, $caseInsensitive);
89 89
     }
90 90
     
91
-    public function buildIfEndsWith(string $ifType, string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
91
+    public function buildIfEndsWith(string $ifType, string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_IfBase
92 92
     {
93 93
         return $this->buildIfSearch($ifType, 'ends-with', $variable, $search, $caseInsensitive);
94 94
     }
95 95
     
96
-    private function buildIfSearch(string $ifType, string $subType, string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
96
+    private function buildIfSearch(string $ifType, string $subType, string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_IfBase
97 97
     {
98 98
         $keyword = ' ';
99 99
         
100
-        if($caseInsensitive)
100
+        if ($caseInsensitive)
101 101
         {
102 102
             $keyword = ' insensitive: ';
103 103
         }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     
122 122
     public function checkCommand(Mailcode_Commands_Command $command) : void
123 123
     {
124
-        if($command->isValid())
124
+        if ($command->isValid())
125 125
         {
126 126
             return;
127 127
         }
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Validation/SearchTerm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $val = $this->validator->createStringLiteral();
35 35
         
36
-        if($val->isValid())
36
+        if ($val->isValid())
37 37
         {
38 38
             $this->searchTerm = $val->getToken();
39 39
         }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     
49 49
     public function getSearchTerm() : string
50 50
     {
51
-        if($this->searchTerm instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral)
51
+        if ($this->searchTerm instanceof Mailcode_Parser_Statement_Tokenizer_Token_StringLiteral)
52 52
         {
53 53
             return $this->searchTerm->getNormalized();
54 54
         }
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Validation/Value.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $var = $this->validator->createValue();
35 35
         
36
-        if($var->isValid())
36
+        if ($var->isValid())
37 37
         {
38 38
             $this->valueToken = $var->getToken();
39 39
         }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     */
54 54
     public function getValue() : string
55 55
     {
56
-        if($this->valueToken instanceof Mailcode_Parser_Statement_Tokenizer_ValueInterface)
56
+        if ($this->valueToken instanceof Mailcode_Parser_Statement_Tokenizer_ValueInterface)
57 57
         {
58 58
             return $this->valueToken->getValue();
59 59
         }
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Validation/Operand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $var = $this->validator->createOperand();
41 41
         
42
-        if($var->isValid())
42
+        if ($var->isValid())
43 43
         {
44
-            if(in_array($var->getSign(), $this->getAllowedOperands()))
44
+            if (in_array($var->getSign(), $this->getAllowedOperands()))
45 45
             {
46 46
                 $this->operandToken = $var->getToken();
47 47
             }
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     
67 67
     public function getOperand() : Mailcode_Parser_Statement_Tokenizer_Token_Operand
68 68
     {
69
-        if($this->operandToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand)
69
+        if ($this->operandToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Operand)
70 70
         {
71 71
             return $this->operandToken;
72 72
         }
Please login to merge, or discard this patch.
src/Mailcode/Traits/Commands/Validation/Variable.php 1 patch
Spacing   +2 added lines, -2 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
         }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     */
54 54
     public function getVariable() : Mailcode_Variables_Variable
55 55
     {
56
-        if($this->variableToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable)
56
+        if ($this->variableToken instanceof Mailcode_Parser_Statement_Tokenizer_Token_Variable)
57 57
         {
58 58
             return $this->variableToken->getVariable();
59 59
         }
Please login to merge, or discard this patch.