Test Failed
Pull Request — master (#200)
by
unknown
03:31
created
src/Components/PartitionDefinition.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@
 block discarded – undo
194 194
     }
195 195
 
196 196
     /**
197
-     * @param PartitionDefinition|PartitionDefinition[] $component the component to be built
197
+     * @param PartitionDefinition[] $component the component to be built
198 198
      * @param array                                     $options   parameters for building
199 199
      *
200 200
      * @return string
Please login to merge, or discard this patch.
src/Utils/Query.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -499,7 +499,7 @@
 block discarded – undo
499 499
      * @param Statement  $statement the parsed query that has to be modified
500 500
      * @param TokensList $list      the list of tokens
501 501
      * @param string     $clause    the clause to be returned
502
-     * @param int|string $type      The type of the search.
502
+     * @param integer $type      The type of the search.
503 503
      *                              If int,
504 504
      *                              -1 for everything that was before
505 505
      *                              0 only for the clause
Please login to merge, or discard this patch.
src/Statements/LoadStatement.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -339,6 +339,11 @@
 block discarded – undo
339 339
         }
340 340
     }
341 341
 
342
+    /**
343
+     * @param Parser $parser
344
+     * @param TokensList $list
345
+     * @param integer $state
346
+     */
342 347
     public function parseKeywordsAccordingToState($parser, $list, $state)
343 348
     {
344 349
         $token = $list->tokens[$list->idx];
Please login to merge, or discard this patch.
src/Components/SetOperation.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
     }
132 132
 
133 133
     /**
134
-     * @param SetOperation|SetOperation[] $component the component to be built
134
+     * @param SetOperation[] $component the component to be built
135 135
      * @param array                       $options   parameters for building
136 136
      *
137 137
      * @return string
Please login to merge, or discard this patch.
src/Context.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -308,7 +308,7 @@
 block discarded – undo
308 308
      * Checks if the given string is the beginning of a whitespace.
309 309
      *
310 310
      * @param string $str string to be checked
311
-     * @param mixed  $end
311
+     * @param boolean  $end
312 312
      *
313 313
      * @return int the appropriate flag for the comment type
314 314
      */
Please login to merge, or discard this 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 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
      * @param TokensList $list    the list of tokens that are being parsed
74 74
      * @param array      $options parameters for parsing
75 75
      *
76
-     * @return component
76
+     * @return Check
77 77
      */
78 78
     public static function parse(Parser $parser, TokensList $list, array $options = array())
79 79
     {
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,9 @@
 block discarded – undo
161 161
                         if(count($bracketStack) > 1) {
162 162
                             array_pop($bracketStack);
163 163
                             $state = 2;
164
-                        } else $state = 5;
164
+                        } else {
165
+                            $state = 5;
166
+                        }
165 167
                     } elseif(in_array($token->value, self::$operatorsArray)) {
166 168
                         $ret->operators[] = $token->value;
167 169
                         $state = 3;
Please login to merge, or discard this 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) || in_array($token->value, self::$operatorsArray)) {
160
-                    if(($token->value === ')')) {
161
-                        if(count($bracketStack) > 1) {
159
+                if (($token->type === Token::TYPE_OPERATOR) || in_array($token->value, self::$operatorsArray)) {
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
@@ -236,13 +236,13 @@  discard block
 block discarded – undo
236 236
         $operators = $component->operators;
237 237
         $operands = $component->operands;
238 238
         $definition = 'CHECK (';
239
-        for($i=0; $i<count($columns); ++$i) {
239
+        for ($i = 0; $i < count($columns); ++$i) {
240 240
             $columns[$i] = trim($columns[$i]);
241
-            if($i>0) {
242
-                $definition .= ' ' . $logical_op[$i-1] . ' ';
241
+            if ($i > 0) {
242
+                $definition .= ' ' . $logical_op[$i - 1] . ' ';
243 243
             }
244 244
             $definition .= Context::escape($columns[$i]);
245
-            if($operators[$i] === 'IS NULL' || $operators[$i] === 'IS NOT NULL') {
245
+            if ($operators[$i] === 'IS NULL' || $operators[$i] === 'IS NOT NULL') {
246 246
                 $definition .= ' ' . $operators[$i];
247 247
             } else {
248 248
                 $definition .= ' ' . $operators[$i] . ' \'' . $operands[$i] . '\'';
Please login to merge, or discard this patch.