Passed
Pull Request — master (#200)
by
unknown
06:48
created
src/Context.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -498,7 +498,7 @@
 block discarded – undo
498 498
                     $i -= 2;
499 499
                     $part = substr($context, $i, 2);
500 500
                     /* No more numeric parts to strip */
501
-                    if (! is_numeric($part)) {
501
+                    if (!is_numeric($part)) {
502 502
                         break 2;
503 503
                     }
504 504
                 } while (intval($part) === 0 && $i > 0);
Please login to merge, or discard this patch.
src/Components/Check.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             if ($state === 0) {
132 132
                 if (($token->type === Token::TYPE_KEYWORD) && $token->keyword === 'CHECK') {
133 133
                     $state = 0;
134
-                } elseif(($token->type === Token::TYPE_OPERATOR) && ($token->value === '(')) {
134
+                } elseif (($token->type === Token::TYPE_OPERATOR) && ($token->value === '(')) {
135 135
                     $state = 1;
136 136
                     array_push($bracketStack, '(');
137 137
                 } else {
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
                     );
142 142
                     return $ret;
143 143
                 }
144
-            } else if($state === 1) {
145
-                if(($token->type === Token::TYPE_OPERATOR) && ($token->value === '(')) {
144
+            } else if ($state === 1) {
145
+                if (($token->type === Token::TYPE_OPERATOR) && ($token->value === '(')) {
146 146
                     array_push($bracketStack, '(');
147 147
                     $state = 1;
148
-                } elseif($token->type === Token::TYPE_OPERATOR) {
148
+                } elseif ($token->type === Token::TYPE_OPERATOR) {
149 149
                     $parser->error(
150 150
                         'A Column name was expected!',
151 151
                         $token
@@ -156,13 +156,13 @@  discard block
 block discarded – undo
156 156
                     $state = 2;
157 157
                 }
158 158
             } elseif ($state === 2) {
159
-                if(($token->type === Token::TYPE_OPERATOR)) {
160
-                    if(($token->value === ')')) {
161
-                        if(count($bracketStack) > 1) {
159
+                if (($token->type === Token::TYPE_OPERATOR)) {
160
+                    if (($token->value === ')')) {
161
+                        if (count($bracketStack) > 1) {
162 162
                             array_pop($bracketStack);
163 163
                             $state = 2;
164 164
                         } else $state = 5;
165
-                    } elseif(in_array($token->value, self::$operatorsArray)) {
165
+                    } elseif (in_array($token->value, self::$operatorsArray)) {
166 166
                         $ret->operators[] = $token->value;
167 167
                         $state = 3;
168 168
                     } else {
@@ -180,10 +180,10 @@  discard block
 block discarded – undo
180 180
                     return $ret;
181 181
                 }
182 182
             } elseif ($state === 3) {
183
-                if(($token->type === Token::TYPE_OPERATOR) && ($token->value === '(')) {
183
+                if (($token->type === Token::TYPE_OPERATOR) && ($token->value === '(')) {
184 184
                     $state = 3;
185 185
                     array_push($bracketStack, '(');
186
-                } elseif($token->type === Token::TYPE_OPERATOR) {
186
+                } elseif ($token->type === Token::TYPE_OPERATOR) {
187 187
                     $parser->error(
188 188
                         'An operand was expected!',
189 189
                         $token
@@ -198,13 +198,13 @@  discard block
 block discarded – undo
198 198
                     $ret->logicalOperators[] = $token->value;
199 199
                     $state = 1;
200 200
                 } elseif (($token->type === Token::TYPE_OPERATOR) && ($token->value === ')')) {
201
-                    if(count($bracketStack) === 1) {
201
+                    if (count($bracketStack) === 1) {
202 202
                         $state = 5;
203 203
                     } else {
204 204
                         array_pop($bracketStack);
205 205
                         $state = 4;
206 206
                     }
207
-                } elseif($token->type === Token::TYPE_OPERATOR) {
207
+                } elseif ($token->type === Token::TYPE_OPERATOR) {
208 208
                     $parser->error(
209 209
                         'Unrecognized token!',
210 210
                         $token
@@ -235,13 +235,13 @@  discard block
 block discarded – undo
235 235
         $operators = $component->operators;
236 236
         $operands = $component->operands;
237 237
         $definition = '(';
238
-        for($i=0; $i<count($columns); ++$i) {
238
+        for ($i = 0; $i < count($columns); ++$i) {
239 239
             $columns[$i] = trim($columns[$i]);
240
-            if($i>0) {
241
-                $definition .= ' ' . $logical_op[$i-1] . ' ';
240
+            if ($i > 0) {
241
+                $definition .= ' ' . $logical_op[$i - 1] . ' ';
242 242
             }
243 243
             $definition .= Util::backquote($columns[$i]);
244
-            if($operators[$i] === 'IS NULL' || $operators[$i] === 'IS NOT NULL') {
244
+            if ($operators[$i] === 'IS NULL' || $operators[$i] === 'IS NOT NULL') {
245 245
                 $definition .= ' ' . $operators[$i];
246 246
             } else {
247 247
                 $definition .= ' ' . $operators[$i] . ' \'' . $operands[$i] . '\'';
Please login to merge, or discard this patch.