Completed
Pull Request — master (#87)
by Deven
97:38 queued 32:38
created
src/Components/AlterOperation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
                     // We have reached the end of ALTER operation and suddenly found
224 224
                     // a start to new statement, but have not find a delimiter between them
225 225
 
226
-                    if (! ($token->value == 'SET' && $list->tokens[$list->idx - 1]->value == 'CHARACTER')) {
226
+                    if (!($token->value == 'SET' && $list->tokens[$list->idx - 1]->value == 'CHARACTER')) {
227 227
                         $parser->error(
228 228
                             __('A new statement was found, but no delimiter between it and the previous one.'),
229 229
                             $token
@@ -255,9 +255,9 @@  discard block
 block discarded – undo
255 255
      */
256 256
     public static function build($component, array $options = array())
257 257
     {
258
-        $ret = $component->options . ' ';
258
+        $ret = $component->options.' ';
259 259
         if ((isset($component->field)) && ($component->field !== '')) {
260
-            $ret .= $component->field . ' ';
260
+            $ret .= $component->field.' ';
261 261
         }
262 262
         $ret .= TokensList::build($component->unknown);
263 263
         return $ret;
Please login to merge, or discard this patch.
src/Components/IntoKeyword.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -139,10 +139,10 @@
 block discarded – undo
139 139
     {
140 140
         if ($component->dest instanceof Expression) {
141 141
             $columns = !empty($component->columns) ?
142
-                '(`' . implode('`, `', $component->columns) . '`)' : '';
143
-            return $component->dest . $columns;
142
+                '(`'.implode('`, `', $component->columns).'`)' : '';
143
+            return $component->dest.$columns;
144 144
         } else {
145
-            return 'OUTFILE "' . $component->dest . '"';
145
+            return 'OUTFILE "'.$component->dest.'"';
146 146
         }
147 147
     }
148 148
 }
Please login to merge, or discard this patch.
src/Statements/SetStatement.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      * @var array
33 33
      */
34 34
     public static $CLAUSES = array(
35
-        'SET'                           => array('SET',         3),
35
+        'SET'                           => array('SET', 3),
36 36
     );
37 37
 
38 38
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function build()
68 68
     {
69
-        return 'SET ' . OptionsArray::build($this->options)
70
-            . ' ' . SetOperation::build($this->set);
69
+        return 'SET '.OptionsArray::build($this->options)
70
+            . ' '.SetOperation::build($this->set);
71 71
     }
72 72
 }
Please login to merge, or discard this patch.
src/Statements/InsertStatement.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -115,19 +115,19 @@
 block discarded – undo
115 115
      */
116 116
     public function build()
117 117
     {
118
-        $ret = 'INSERT ' . $this->options
119
-            . ' INTO ' . $this->into;
118
+        $ret = 'INSERT '.$this->options
119
+            . ' INTO '.$this->into;
120 120
 
121 121
         if ($this->values != NULL && count($this->values) > 0) {
122
-            $ret .= ' VALUES ' . Array2d::build($this->values);
122
+            $ret .= ' VALUES '.Array2d::build($this->values);
123 123
         } elseif ($this->set != NULL && count($this->set) > 0) {
124
-            $ret .= ' SET ' . SetOperation::build($this->set);
124
+            $ret .= ' SET '.SetOperation::build($this->set);
125 125
         } elseif ($this->select != NULL && count($this->select) > 0) {
126
-            $ret .= ' ' . $this->select->build();
126
+            $ret .= ' '.$this->select->build();
127 127
         }
128 128
 
129 129
         if ($this->onDuplicateSet != NULL && count($this->onDuplicateSet) > 0) {
130
-            $ret .= ' ON DUPLICATE KEY UPDATE ' . SetOperation::build($this->onDuplicateSet);
130
+            $ret .= ' ON DUPLICATE KEY UPDATE '.SetOperation::build($this->onDuplicateSet);
131 131
         }
132 132
 
133 133
         return $ret;
Please login to merge, or discard this patch.
src/Statements/ReplaceStatement.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -93,15 +93,15 @@
 block discarded – undo
93 93
      */
94 94
     public function build()
95 95
     {
96
-        $ret = 'REPLACE ' . $this->options
97
-            . ' INTO ' . $this->into;
96
+        $ret = 'REPLACE '.$this->options
97
+            . ' INTO '.$this->into;
98 98
 
99 99
         if ($this->values != NULL && count($this->values) > 0) {
100
-            $ret .= ' VALUES ' . Array2d::build($this->values);
100
+            $ret .= ' VALUES '.Array2d::build($this->values);
101 101
         } elseif ($this->set != NULL && count($this->set) > 0) {
102
-            $ret .= ' SET ' . SetOperation::build($this->set);
102
+            $ret .= ' SET '.SetOperation::build($this->set);
103 103
         } elseif ($this->select != NULL && count($this->select) > 0) {
104
-            $ret .= ' ' . $this->select->build();
104
+            $ret .= ' '.$this->select->build();
105 105
         }
106 106
 
107 107
         return $ret;
Please login to merge, or discard this patch.
src/Components/OptionsArray.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@
 block discarded – undo
183 183
                         'value' => '',
184 184
                     );
185 185
                     $state = 1;
186
-                } elseif ($lastOption[1] === 'expr'  || $lastOption[1] === 'expr=') {
186
+                } elseif ($lastOption[1] === 'expr' || $lastOption[1] === 'expr=') {
187 187
                     // This is a keyword that is followed by an expression.
188 188
                     // The expression is used by the specialized parser.
189 189
 
Please login to merge, or discard this patch.
src/Utils/Formatter.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
                     // pieces only if the clause is not inlined or this fragment
351 351
                     // is between brackets that are on new line.
352 352
                     if (((empty(self::$INLINE_CLAUSES[$lastClause]))
353
-                        && ! $shortGroup
353
+                        && !$shortGroup
354 354
                         && ($this->options['parts_newline']))
355 355
                         || (end($blocksLineEndings) === true)
356 356
                     ) {
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
         }
425 425
 
426 426
         if ($this->options['type'] === 'cli') {
427
-            return $ret . "\x1b[0m";
427
+            return $ret."\x1b[0m";
428 428
         }
429 429
 
430 430
         return $ret;
@@ -436,9 +436,9 @@  discard block
 block discarded – undo
436 436
             array(
437 437
                 "\x00", "\x01", "\x02", "\x03", "\x04",
438 438
                 "\x05", "\x06", "\x07", "\x08", "\x09", "\x0A",
439
-                "\x0B","\x0C","\x0D", "\x0E", "\x0F", "\x10", "\x11",
440
-                "\x12","\x13","\x14","\x15", "\x16", "\x17", "\x18",
441
-                "\x19","\x1A","\x1B","\x1C","\x1D", "\x1E", "\x1F"
439
+                "\x0B", "\x0C", "\x0D", "\x0E", "\x0F", "\x10", "\x11",
440
+                "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", "\x18",
441
+                "\x19", "\x1A", "\x1B", "\x1C", "\x1D", "\x1E", "\x1F"
442 442
             ),
443 443
             array(
444 444
                 '\x00', '\x01', '\x02', '\x03', '\x04',
@@ -474,9 +474,9 @@  discard block
 block discarded – undo
474 474
 
475 475
                 // Formatting HTML.
476 476
                 if ($this->options['type'] === 'html') {
477
-                    return '<span ' . $format['html'] . '>' . htmlspecialchars($text, ENT_NOQUOTES) . '</span>';
477
+                    return '<span '.$format['html'].'>'.htmlspecialchars($text, ENT_NOQUOTES).'</span>';
478 478
                 } elseif ($this->options['type'] === 'cli') {
479
-                    return $format['cli'] . $this->escapeConsole($text);
479
+                    return $format['cli'].$this->escapeConsole($text);
480 480
                 }
481 481
 
482 482
                 break;
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
         }
485 485
 
486 486
         if ($this->options['type'] === 'cli') {
487
-            return "\x1b[39m" . $this->escapeConsole($text);
487
+            return "\x1b[39m".$this->escapeConsole($text);
488 488
         } elseif ($this->options['type'] === 'html') {
489 489
             return htmlspecialchars($text, ENT_NOQUOTES);
490 490
         }
Please login to merge, or discard this patch.
src/Statements/DeleteStatement.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -119,25 +119,25 @@
 block discarded – undo
119 119
      */
120 120
     public function build()
121 121
     {
122
-        $ret = 'DELETE ' . OptionsArray::build($this->options);
122
+        $ret = 'DELETE '.OptionsArray::build($this->options);
123 123
 
124 124
         if ($this->columns != NULL && count($this->columns) > 0) {
125
-            $ret .= ' ' . ExpressionArray::build($this->columns);
125
+            $ret .= ' '.ExpressionArray::build($this->columns);
126 126
         }
127 127
         if ($this->from != NULL && count($this->from) > 0) {
128
-            $ret .= ' FROM ' . ExpressionArray::build($this->from);
128
+            $ret .= ' FROM '.ExpressionArray::build($this->from);
129 129
         }
130 130
         if ($this->using != NULL && count($this->using) > 0) {
131
-            $ret .= ' USING ' . ExpressionArray::build($this->using);
131
+            $ret .= ' USING '.ExpressionArray::build($this->using);
132 132
         }
133 133
         if ($this->where != NULL && count($this->where) > 0) {
134
-            $ret .= ' WHERE ' . Condition::build($this->where);
134
+            $ret .= ' WHERE '.Condition::build($this->where);
135 135
         }
136 136
         if ($this->order != NULL && count($this->order) > 0) {
137
-            $ret .= ' ORDER BY ' . ExpressionArray::build($this->order);
137
+            $ret .= ' ORDER BY '.ExpressionArray::build($this->order);
138 138
         }
139 139
         if ($this->limit != NULL && count($this->limit) > 0) {
140
-            $ret .= ' LIMIT ' . Limit::build($this->limit);
140
+            $ret .= ' LIMIT '.Limit::build($this->limit);
141 141
         }
142 142
 
143 143
         return $ret;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -302,7 +302,7 @@
 block discarded – undo
302 302
                     ++$list->idx; // Skip 'ORDER  BY'
303 303
                     $this->order = OrderKeyword::parse($parser, $list);
304 304
                     $state = 5;
305
-                }  elseif ($token->type === Token::TYPE_KEYWORD
305
+                } elseif ($token->type === Token::TYPE_KEYWORD
306 306
                     && $token->value === 'LIMIT'
307 307
                 ) {
308 308
                     ++$list->idx; // Skip 'LIMIT'
Please login to merge, or discard this patch.
src/Components/Limit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,6 +127,6 @@
 block discarded – undo
127 127
      */
128 128
     public static function build($component, array $options = array())
129 129
     {
130
-        return $component->offset . ', ' . $component->rowCount;
130
+        return $component->offset.', '.$component->rowCount;
131 131
     }
132 132
 }
Please login to merge, or discard this patch.