Passed
Pull Request — master (#294)
by William
04:00
created
src/Statements/CreateStatement.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
     public function build()
377 377
     {
378 378
         $fields = '';
379
-        if (! empty($this->fields)) {
379
+        if (!empty($this->fields)) {
380 380
             if (is_array($this->fields)) {
381 381
                 $fields = CreateDefinition::build($this->fields) . ' ';
382 382
             } elseif ($this->fields instanceof ArrayObj) {
@@ -389,12 +389,12 @@  discard block
 block discarded – undo
389 389
                 . Expression::build($this->name) . ' '
390 390
                 . OptionsArray::build($this->entityOptions);
391 391
         } elseif ($this->options->has('TABLE')) {
392
-            if (! is_null($this->select)) {
392
+            if (!is_null($this->select)) {
393 393
                 return 'CREATE '
394 394
                     . OptionsArray::build($this->options) . ' '
395 395
                     . Expression::build($this->name) . ' '
396 396
                     . $this->select->build();
397
-            } elseif (! is_null($this->like)) {
397
+            } elseif (!is_null($this->like)) {
398 398
                 return 'CREATE '
399 399
                     . OptionsArray::build($this->options) . ' '
400 400
                     . Expression::build($this->name) . ' LIKE '
@@ -402,19 +402,19 @@  discard block
 block discarded – undo
402 402
             } else {
403 403
                 $partition = '';
404 404
 
405
-                if (! empty($this->partitionBy)) {
405
+                if (!empty($this->partitionBy)) {
406 406
                     $partition .= "\nPARTITION BY " . $this->partitionBy;
407 407
                 }
408
-                if (! empty($this->partitionsNum)) {
408
+                if (!empty($this->partitionsNum)) {
409 409
                     $partition .= "\nPARTITIONS " . $this->partitionsNum;
410 410
                 }
411
-                if (! empty($this->subpartitionBy)) {
411
+                if (!empty($this->subpartitionBy)) {
412 412
                     $partition .= "\nSUBPARTITION BY " . $this->subpartitionBy;
413 413
                 }
414
-                if (! empty($this->subpartitionsNum)) {
414
+                if (!empty($this->subpartitionsNum)) {
415 415
                     $partition .= "\nSUBPARTITIONS " . $this->subpartitionsNum;
416 416
                 }
417
-                if (! empty($this->partitions)) {
417
+                if (!empty($this->partitions)) {
418 418
                     $partition .= "\n" . PartitionDefinition::build($this->partitions);
419 419
                 }
420 420
 
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
             )
485 485
         );
486 486
 
487
-        if (! isset($this->name) || ($this->name === '')) {
487
+        if (!isset($this->name) || ($this->name === '')) {
488 488
             $parser->error(
489 489
                 'The name of the entity was expected.',
490 490
                 $list->tokens[$list->idx]
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
                         $token = $list->getNextOfType(Token::TYPE_NUMBER);
609 609
                         --$list->idx; // `getNextOfType` also advances one position.
610 610
                         $this->subpartitionsNum = $token->value;
611
-                    } elseif (! empty($field)) {
611
+                    } elseif (!empty($field)) {
612 612
                         /*
613 613
                          * Handling the content of `PARTITION BY` and `SUBPARTITION BY`.
614 614
                          */
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
                             $field = null;
638 638
                         }
639 639
                     } elseif (($token->type === Token::TYPE_OPERATOR) && ($token->value === '(')) {
640
-                        if (! empty($this->partitionBy)) {
640
+                        if (!empty($this->partitionBy)) {
641 641
                             $this->partitions = ArrayObj::parse(
642 642
                                 $parser,
643 643
                                 $list,
Please login to merge, or discard this patch.
src/Statements/InsertStatement.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -113,15 +113,15 @@
 block discarded – undo
113 113
         $ret = 'INSERT ' . $this->options;
114 114
         $ret = trim($ret) . ' INTO ' . $this->into;
115 115
 
116
-        if (! is_null($this->values) && count($this->values) > 0) {
116
+        if (!is_null($this->values) && count($this->values) > 0) {
117 117
             $ret .= ' VALUES ' . Array2d::build($this->values);
118
-        } elseif (! is_null($this->set) && count($this->set) > 0) {
118
+        } elseif (!is_null($this->set) && count($this->set) > 0) {
119 119
             $ret .= ' SET ' . SetOperation::build($this->set);
120
-        } elseif (! is_null($this->select) && strlen($this->select) > 0) {
120
+        } elseif (!is_null($this->select) && strlen($this->select) > 0) {
121 121
             $ret .= ' ' . $this->select->build();
122 122
         }
123 123
 
124
-        if (! is_null($this->onDuplicateSet) && count($this->onDuplicateSet) > 0) {
124
+        if (!is_null($this->onDuplicateSet) && count($this->onDuplicateSet) > 0) {
125 125
             $ret .= ' ON DUPLICATE KEY UPDATE ' . SetOperation::build($this->onDuplicateSet);
126 126
         }
127 127
 
Please login to merge, or discard this patch.
src/Statements/SelectStatement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -331,7 +331,7 @@
 block discarded – undo
331 331
         // This is a cheap fix for `SELECT` statements that contain `UNION`.
332 332
         // The `ORDER BY` and `LIMIT` clauses should be at the end of the
333 333
         // statement.
334
-        if (! empty($this->union)) {
334
+        if (!empty($this->union)) {
335 335
             $clauses = static::$CLAUSES;
336 336
             unset($clauses['ORDER BY'], $clauses['LIMIT']);
337 337
             $clauses['ORDER BY'] = array(
Please login to merge, or discard this patch.
src/Statements/ReplaceStatement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,11 +90,11 @@
 block discarded – undo
90 90
         $ret = 'REPLACE ' . $this->options;
91 91
         $ret = trim($ret) . ' INTO ' . $this->into;
92 92
 
93
-        if (! is_null($this->values) && count($this->values) > 0) {
93
+        if (!is_null($this->values) && count($this->values) > 0) {
94 94
             $ret .= ' VALUES ' . Array2d::build($this->values);
95
-        } elseif (! is_null($this->set) && count($this->set) > 0) {
95
+        } elseif (!is_null($this->set) && count($this->set) > 0) {
96 96
             $ret .= ' SET ' . SetOperation::build($this->set);
97
-        } elseif (! is_null($this->select) && strlen($this->select) > 0) {
97
+        } elseif (!is_null($this->select) && strlen($this->select) > 0) {
98 98
             $ret .= ' ' . $this->select->build();
99 99
         }
100 100
 
Please login to merge, or discard this patch.
src/Token.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         switch ($this->type) {
243 243
             case self::TYPE_KEYWORD:
244 244
                 $this->keyword = strtoupper($this->token);
245
-                if (! ($this->flags & self::FLAG_KEYWORD_RESERVED)) {
245
+                if (!($this->flags & self::FLAG_KEYWORD_RESERVED)) {
246 246
                     // Unreserved keywords should stay the way they are because they
247 247
                     // might represent field names.
248 248
                     return $this->token;
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
                 || ($this->flags & self::FLAG_NUMBER_FLOAT)
267 267
                 ) {
268 268
                     $ret = (float) $ret;
269
-                } elseif (! ($this->flags & self::FLAG_NUMBER_BINARY)) {
269
+                } elseif (!($this->flags & self::FLAG_NUMBER_BINARY)) {
270 270
                     $ret = (int) $ret;
271 271
                 }
272 272
 
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
                     // in PHP 5.3- the `null` parameter isn't handled correctly.
300 300
                     $str = mb_substr(
301 301
                         $str,
302
-                        (! empty($str[1]) && ($str[1] === '@')) ? 2 : 1,
302
+                        (!empty($str[1]) && ($str[1] === '@')) ? 2 : 1,
303 303
                         mb_strlen($str),
304 304
                         'UTF-8'
305 305
                     );
Please login to merge, or discard this patch.
src/Components/AlterOperation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -271,11 +271,11 @@  discard block
 block discarded – undo
271 271
                     } elseif (($token->value === ',') && ($brackets === 0)) {
272 272
                         break;
273 273
                     }
274
-                } elseif (! empty(Parser::$STATEMENT_PARSERS[$token->value])) {
274
+                } elseif (!empty(Parser::$STATEMENT_PARSERS[$token->value])) {
275 275
                     // We have reached the end of ALTER operation and suddenly found
276 276
                     // a start to new statement, but have not find a delimiter between them
277 277
 
278
-                    if (! ($token->value === 'SET' && $list->tokens[$list->idx - 1]->value === 'CHARACTER')) {
278
+                    if (!($token->value === 'SET' && $list->tokens[$list->idx - 1]->value === 'CHARACTER')) {
279 279
                         $parser->error(
280 280
                             'A new statement was found, but no delimiter between it and the previous one.',
281 281
                             $token
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                     }
285 285
                 } elseif ((array_key_exists($token->value, self::$DB_OPTIONS)
286 286
                     || array_key_exists($token->value, self::$TABLE_OPTIONS))
287
-                    && ! self::checkIfColumnDefinitionKeyword($token->value)
287
+                    && !self::checkIfColumnDefinitionKeyword($token->value)
288 288
                 ) {
289 289
                     // This alter operation has finished, which means a comma was missing before start of new alter operation
290 290
                     $parser->error(
Please login to merge, or discard this patch.
src/Components/IntoKeyword.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -272,7 +272,7 @@
 block discarded – undo
272 272
     public static function build($component, array $options = array())
273 273
     {
274 274
         if ($component->dest instanceof Expression) {
275
-            $columns = ! empty($component->columns) ? '(`' . implode('`, `', $component->columns) . '`)' : '';
275
+            $columns = !empty($component->columns) ? '(`' . implode('`, `', $component->columns) . '`)' : '';
276 276
 
277 277
             return $component->dest . $columns;
278 278
         } elseif (isset($component->values)) {
Please login to merge, or discard this patch.
src/Components/RenameOperation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
         }
157 157
 
158 158
         // Last iteration was not saved.
159
-        if (! empty($expr->old)) {
159
+        if (!empty($expr->old)) {
160 160
             $ret[] = $expr;
161 161
         }
162 162
 
Please login to merge, or discard this patch.
src/Components/Key.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
                         $state = 3;
163 163
                     } elseif (($token->value === ',') || ($token->value === ')')) {
164 164
                         $state = ($token->value === ',') ? 2 : 4;
165
-                        if (! empty($lastColumn)) {
165
+                        if (!empty($lastColumn)) {
166 166
                             $ret->columns[] = $lastColumn;
167 167
                             $lastColumn = array();
168 168
                         }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
     public static function build($component, array $options = array())
198 198
     {
199 199
         $ret = $component->type . ' ';
200
-        if (! empty($component->name)) {
200
+        if (!empty($component->name)) {
201 201
             $ret .= Context::escape($component->name) . ' ';
202 202
         }
203 203
 
Please login to merge, or discard this patch.