Completed
Pull Request — master (#99)
by Deven
63:04
created
src/Components/PartitionDefinition.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@
 block discarded – undo
198 198
     }
199 199
 
200 200
     /**
201
-     * @param PartitionDefinition|PartitionDefinition[] $component The component to be built.
201
+     * @param PartitionDefinition[] $component The component to be built.
202 202
      * @param array                                     $options   Parameters for building.
203 203
      *
204 204
      * @return string
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -206,17 +206,17 @@
 block discarded – undo
206 206
     public static function build($component, array $options = array())
207 207
     {
208 208
         if (is_array($component)) {
209
-            return "(\n" . implode(",\n", $component) . "\n)";
209
+            return "(\n".implode(",\n", $component)."\n)";
210 210
         } else {
211 211
             if ($component->isSubpartition) {
212
-                return trim('SUBPARTITION ' . $component->name . ' ' . $component->options);
212
+                return trim('SUBPARTITION '.$component->name.' '.$component->options);
213 213
             } else {
214 214
                 $subpartitions = empty($component->subpartitions)
215
-                    ? '' : ' ' . PartitionDefinition::build($component->subpartitions);
215
+                    ? '' : ' '.PartitionDefinition::build($component->subpartitions);
216 216
                 return trim(
217
-                    'PARTITION ' . $component->name
218
-                    . (empty($component->type) ? '' : ' VALUES ' . $component->type . ' ' . $component->expr . ' ')
219
-                    . $component->options . $subpartitions
217
+                    'PARTITION '.$component->name
218
+                    . (empty($component->type) ? '' : ' VALUES '.$component->type.' '.$component->expr.' ')
219
+                    . $component->options.$subpartitions
220 220
                 );
221 221
             }
222 222
         }
Please login to merge, or discard this patch.
src/Statements/UpdateStatement.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -57,15 +57,15 @@
 block discarded – undo
57 57
      * @var array
58 58
      */
59 59
     public static $CLAUSES = array(
60
-        'UPDATE'                        => array('UPDATE',      2),
60
+        'UPDATE'                        => array('UPDATE', 2),
61 61
         // Used for options.
62
-        '_OPTIONS'                      => array('_OPTIONS',    1),
62
+        '_OPTIONS'                      => array('_OPTIONS', 1),
63 63
         // Used for updated tables.
64
-        '_UPDATE'                       => array('UPDATE',      1),
65
-        'SET'                           => array('SET',         3),
66
-        'WHERE'                         => array('WHERE',       3),
67
-        'ORDER BY'                      => array('ORDER BY',    3),
68
-        'LIMIT'                         => array('LIMIT',       3),
64
+        '_UPDATE'                       => array('UPDATE', 1),
65
+        'SET'                           => array('SET', 3),
66
+        'WHERE'                         => array('WHERE', 3),
67
+        'ORDER BY'                      => array('ORDER BY', 3),
68
+        'LIMIT'                         => array('LIMIT', 3),
69 69
     );
70 70
 
71 71
     /**
Please login to merge, or discard this patch.
src/Utils/Query.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -505,7 +505,7 @@
 block discarded – undo
505 505
      * @param Statement  $statement The parsed query that has to be modified.
506 506
      * @param TokensList $list      The list of tokens.
507 507
      * @param string     $clause    The clause to be returned.
508
-     * @param int|string $type      The type of the search.
508
+     * @param integer $type      The type of the search.
509 509
      *                              If int,
510 510
      *                                -1 for everything that was before
511 511
      *                                 0 only for the clause
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -658,13 +658,13 @@  discard block
 block discarded – undo
658 658
         }
659 659
 
660 660
         if ($onlyType) {
661
-            return static::getClause($statement, $list, $old, -1, false) . ' ' .
662
-                $new . ' ' . static::getClause($statement, $list, $old, 0) . ' ' .
661
+            return static::getClause($statement, $list, $old, -1, false).' '.
662
+                $new.' '.static::getClause($statement, $list, $old, 0).' '.
663 663
                 static::getClause($statement, $list, $old, 1, false);
664 664
         }
665 665
 
666
-        return static::getClause($statement, $list, $old, -1, false) . ' ' .
667
-            $new . ' ' . static::getClause($statement, $list, $old, 1, false);
666
+        return static::getClause($statement, $list, $old, -1, false).' '.
667
+            $new.' '.static::getClause($statement, $list, $old, 1, false);
668 668
     }
669 669
 
670 670
     /**
@@ -706,15 +706,15 @@  discard block
 block discarded – undo
706 706
         }
707 707
 
708 708
         // Adding everything before first replacement.
709
-        $ret .= static::getClause($statement, $list, $ops[0][0], -1) . ' ';
709
+        $ret .= static::getClause($statement, $list, $ops[0][0], -1).' ';
710 710
 
711 711
         // Doing replacements.
712 712
         for ($i = 0; $i < $count; ++$i) {
713
-            $ret .= $ops[$i][1] . ' ';
713
+            $ret .= $ops[$i][1].' ';
714 714
 
715 715
             // Adding everything between this and next replacement.
716 716
             if ($i + 1 !== $count) {
717
-                $ret .= static::getClause($statement, $list, $ops[$i][0], $ops[$i + 1][0]) . ' ';
717
+                $ret .= static::getClause($statement, $list, $ops[$i][0], $ops[$i + 1][0]).' ';
718 718
             }
719 719
         }
720 720
 
Please login to merge, or discard this patch.
src/Statements/DropStatement.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,12 +54,12 @@
 block discarded – undo
54 54
      * @var array
55 55
      */
56 56
     public static $CLAUSES = array(
57
-        'DROP'                          => array('DROP',        2),
57
+        'DROP'                          => array('DROP', 2),
58 58
         // Used for options.
59
-        '_OPTIONS'                      => array('_OPTIONS',    1),
59
+        '_OPTIONS'                      => array('_OPTIONS', 1),
60 60
         // Used for select expressions.
61
-        'DROP_'                         => array('DROP',        1),
62
-        'ON'                            => array('ON',          3),
61
+        'DROP_'                         => array('DROP', 1),
62
+        'ON'                            => array('ON', 3),
63 63
     );
64 64
 
65 65
     /**
Please login to merge, or discard this patch.
src/Utils/CLI.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@
 block discarded – undo
36 36
                 $params[$value[0]] = $params[$value];
37 37
             }
38 38
         }
39
-        if (! isset($params['f'])) {
39
+        if (!isset($params['f'])) {
40 40
             $params['f'] = 'cli';
41 41
         }
42
-        if (! in_array($params['f'], array('html', 'cli', 'text'))) {
42
+        if (!in_array($params['f'], array('html', 'cli', 'text'))) {
43 43
             return false;
44 44
         }
45 45
         return $params;
Please login to merge, or discard this patch.
src/Utils/Routine.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
      */
68 68
     public static function getParameter($param)
69 69
     {
70
-        $lexer = new Lexer('(' . $param . ')');
70
+        $lexer = new Lexer('('.$param.')');
71 71
 
72 72
         // A dummy parser is used for error reporting.
73 73
         $param = ParameterDefinition::parse(new Parser(), $lexer->list);
Please login to merge, or discard this patch.
src/Utils/BufferedQuery.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
              * be ignored.
201 201
              */
202 202
             if ((($this->status & static::STATUS_COMMENT) == 0) && ($this->query[$i] === '\\')) {
203
-                $this->current .= $this->query[$i] . $this->query[++$i];
203
+                $this->current .= $this->query[$i].$this->query[++$i];
204 204
                 continue;
205 205
             }
206 206
 
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
              * statement. This is the reason for the last condition.
296 296
              */
297 297
             if (($i + 9 < $len)
298
-                && (($this->query[$i    ] === 'D') || ($this->query[$i    ] === 'd'))
298
+                && (($this->query[$i] === 'D') || ($this->query[$i] === 'd'))
299 299
                 && (($this->query[$i + 1] === 'E') || ($this->query[$i + 1] === 'e'))
300 300
                 && (($this->query[$i + 2] === 'L') || ($this->query[$i + 2] === 'l'))
301 301
                 && (($this->query[$i + 3] === 'I') || ($this->query[$i + 3] === 'i'))
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
                         // Appending the `DELIMITER` statement that was just
338 338
                         // found to the current statement.
339 339
                         $ret = trim(
340
-                            $this->current . ' ' . substr($this->query, $iBak, $i - $iBak)
340
+                            $this->current.' '.substr($this->query, $iBak, $i - $iBak)
341 341
                         );
342 342
                     }
343 343
 
Please login to merge, or discard this patch.
src/Components/CreateDefinition.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
     public static function build($component, array $options = array())
289 289
     {
290 290
         if (is_array($component)) {
291
-            return "(\n  " . implode(",\n  ", $component) . "\n)";
291
+            return "(\n  ".implode(",\n  ", $component)."\n)";
292 292
         } else {
293 293
             $tmp = '';
294 294
 
@@ -297,22 +297,22 @@  discard block
 block discarded – undo
297 297
             }
298 298
 
299 299
             if ((isset($component->name)) && ($component->name !== '')) {
300
-                $tmp .= Context::escape($component->name) . ' ';
300
+                $tmp .= Context::escape($component->name).' ';
301 301
             }
302 302
 
303 303
             if (!empty($component->type)) {
304 304
                 $tmp .= DataType::build(
305 305
                     $component->type,
306 306
                     array('lowercase' => true)
307
-                ) . ' ';
307
+                ).' ';
308 308
             }
309 309
 
310 310
             if (!empty($component->key)) {
311
-                $tmp .= $component->key . ' ';
311
+                $tmp .= $component->key.' ';
312 312
             }
313 313
 
314 314
             if (!empty($component->references)) {
315
-                $tmp .= 'REFERENCES ' . $component->references . ' ';
315
+                $tmp .= 'REFERENCES '.$component->references.' ';
316 316
             }
317 317
 
318 318
             $tmp .= $component->options;
Please login to merge, or discard this patch.
src/Components/FunctionCall.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,6 +120,6 @@
 block discarded – undo
120 120
      */
121 121
     public static function build($component, array $options = array())
122 122
     {
123
-        return $component->name . $component->parameters;
123
+        return $component->name.$component->parameters;
124 124
     }
125 125
 }
Please login to merge, or discard this patch.