Passed
Push — master ( 77f2a3...0c35c3 )
by Sebastian
03:02
created
src/Mailcode/Factory/Instantiator.php 1 patch
Spacing   +13 added lines, -13 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
         }
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
      * @return Mailcode_Commands_IfBase
87 87
      * @throws Mailcode_Factory_Exception
88 88
      */
89
-    public function buildIfContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive=false, string $containsType='contains') : Mailcode_Commands_IfBase
89
+    public function buildIfContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive = false, string $containsType = 'contains') : Mailcode_Commands_IfBase
90 90
     {
91 91
         $keyword = ' ';
92 92
         
93
-        if($caseInsensitive)
93
+        if ($caseInsensitive)
94 94
         {
95 95
             $keyword = ' '.Mailcode_Commands_Keywords::TYPE_INSENSITIVE;
96 96
         }
@@ -105,17 +105,17 @@  discard block
 block discarded – undo
105 105
         return $this->buildIf($ifType, $condition, $containsType);
106 106
     }
107 107
 
108
-    public function buildIfNotContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive=false, string $containsType='contains') : Mailcode_Commands_IfBase
108
+    public function buildIfNotContains(string $ifType, string $variable, array $searchTerms, bool $caseInsensitive = false, string $containsType = 'contains') : Mailcode_Commands_IfBase
109 109
     {
110 110
         return $this->buildIfContains($ifType, $variable, $searchTerms, $caseInsensitive, 'not-contains');
111 111
     }
112 112
     
113
-    public function buildIfBeginsWith(string $ifType, string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
113
+    public function buildIfBeginsWith(string $ifType, string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_IfBase
114 114
     {
115 115
         return $this->buildIfSearch($ifType, 'begins-with', $variable, $search, $caseInsensitive);
116 116
     }
117 117
     
118
-    public function buildIfEndsWith(string $ifType, string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
118
+    public function buildIfEndsWith(string $ifType, string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_IfBase
119 119
     {
120 120
         return $this->buildIfSearch($ifType, 'ends-with', $variable, $search, $caseInsensitive);
121 121
     }
@@ -165,11 +165,11 @@  discard block
 block discarded – undo
165 165
         );
166 166
     }
167 167
 
168
-    private function buildIfSearch(string $ifType, string $subType, string $variable, string $search, bool $caseInsensitive=false) : Mailcode_Commands_IfBase
168
+    private function buildIfSearch(string $ifType, string $subType, string $variable, string $search, bool $caseInsensitive = false) : Mailcode_Commands_IfBase
169 169
     {
170 170
         $keyword = ' ';
171 171
         
172
-        if($caseInsensitive)
172
+        if ($caseInsensitive)
173 173
         {
174 174
             $keyword = ' '.Mailcode_Commands_Keywords::TYPE_INSENSITIVE;
175 175
         }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
     
199 199
     public function checkCommand(Mailcode_Commands_Command $command) : void
200 200
     {
201
-        if($command->isValid())
201
+        if ($command->isValid())
202 202
         {
203 203
             return;
204 204
         }
Please login to merge, or discard this patch.