Passed
Pull Request — master (#287)
by William
07:56
created
src/Components/PartitionDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -247,7 +247,7 @@
 block discarded – undo
247 247
         return trim(
248 248
             'PARTITION ' . $component->name
249 249
             . (empty($component->type) ? '' : ' VALUES ' . $component->type . ' ' . $component->expr . ' ')
250
-            . ((! empty($component->options) && ! empty($component->type)) ? '' : ' ') . $component->options . $subpartitions
250
+            . ((!empty($component->options) && !empty($component->type)) ? '' : ' ') . $component->options . $subpartitions
251 251
         );
252 252
     }
253 253
 }
Please login to merge, or discard this patch.
src/Components/Condition.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                 } else {
155 155
                     // The expression ended.
156 156
                     $expr->expr = trim($expr->expr);
157
-                    if (! empty($expr->expr)) {
157
+                    if (!empty($expr->expr)) {
158 158
                         $ret[] = $expr;
159 159
                     }
160 160
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
             if (($token->type === Token::TYPE_KEYWORD)
173 173
                 && ($token->flags & Token::FLAG_KEYWORD_RESERVED)
174
-                && ! ($token->flags & Token::FLAG_KEYWORD_FUNCTION)
174
+                && !($token->flags & Token::FLAG_KEYWORD_FUNCTION)
175 175
             ) {
176 176
                 if ($token->value === 'BETWEEN') {
177 177
                     $betweenBefore = true;
@@ -195,11 +195,11 @@  discard block
 block discarded – undo
195 195
             $expr->expr .= $token->token;
196 196
             if (($token->type === Token::TYPE_NONE)
197 197
                 || (($token->type === Token::TYPE_KEYWORD)
198
-                && (! ($token->flags & Token::FLAG_KEYWORD_RESERVED)))
198
+                && (!($token->flags & Token::FLAG_KEYWORD_RESERVED)))
199 199
                 || ($token->type === Token::TYPE_STRING)
200 200
                 || ($token->type === Token::TYPE_SYMBOL)
201 201
             ) {
202
-                if (! in_array($token->value, $expr->identifiers)) {
202
+                if (!in_array($token->value, $expr->identifiers)) {
203 203
                     $expr->identifiers[] = $token->value;
204 204
                 }
205 205
             }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 
208 208
         // Last iteration was not processed.
209 209
         $expr->expr = trim($expr->expr);
210
-        if (! empty($expr->expr)) {
210
+        if (!empty($expr->expr)) {
211 211
             $ret[] = $expr;
212 212
         }
213 213
 
Please login to merge, or discard this patch.
src/Components/JoinKeyword.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
             if ($state === 0) {
153 153
                 if (($token->type === Token::TYPE_KEYWORD)
154
-                    && ! empty(static::$JOINS[$token->keyword])
154
+                    && !empty(static::$JOINS[$token->keyword])
155 155
                 ) {
156 156
                     $expr->type = static::$JOINS[$token->keyword];
157 157
                     $state = 1;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
                             $state = 4;
172 172
                             break;
173 173
                         default:
174
-                            if (! empty(static::$JOINS[$token->keyword])
174
+                            if (!empty(static::$JOINS[$token->keyword])
175 175
                             ) {
176 176
                                 $ret[] = $expr;
177 177
                                 $expr = new self();
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
             }
198 198
         }
199 199
 
200
-        if (! empty($expr->type)) {
200
+        if (!empty($expr->type)) {
201 201
             $ret[] = $expr;
202 202
         }
203 203
 
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
         $ret = array();
218 218
         foreach ($component as $c) {
219 219
             $ret[] = array_search($c->type, static::$JOINS) . ' ' . $c->expr
220
-                . (! empty($c->on)
220
+                . (!empty($c->on)
221 221
                     ? ' ON ' . Condition::build($c->on) : '')
222
-                . (! empty($c->using)
222
+                . (!empty($c->using)
223 223
                     ? ' USING ' . ArrayObj::build($c->using) : '');
224 224
         }
225 225
 
Please login to merge, or discard this patch.
src/Components/OrderKeyword.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                 } elseif (($token->type === Token::TYPE_OPERATOR)
103 103
                     && ($token->value === ',')
104 104
                 ) {
105
-                    if (! empty($expr->expr)) {
105
+                    if (!empty($expr->expr)) {
106 106
                         $ret[] = $expr;
107 107
                     }
108 108
                     $expr = new self();
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         }
115 115
 
116 116
         // Last iteration was not processed.
117
-        if (! empty($expr->expr)) {
117
+        if (!empty($expr->expr)) {
118 118
             $ret[] = $expr;
119 119
         }
120 120
 
Please login to merge, or discard this patch.
src/Utils/Tokens.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $isList = $list instanceof TokensList;
77 77
 
78 78
         // Parsing the tokens.
79
-        if (! $isList) {
79
+        if (!$isList) {
80 80
             $list = Lexer::getTokens($list);
81 81
         }
82 82
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                     ++$j;
137 137
                 }
138 138
 
139
-                if (! static::match($list->tokens[$j], $find[$k])) {
139
+                if (!static::match($list->tokens[$j], $find[$k])) {
140 140
                     // This token does not match the pattern.
141 141
                     break;
142 142
                 }
Please login to merge, or discard this patch.
src/Utils/Formatter.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -258,12 +258,12 @@  discard block
 block discarded – undo
258 258
         /* Sanitize the array so that we do not have to care later */
259 259
         foreach ($newFormats as $j => $new) {
260 260
             foreach ($integers as $name) {
261
-                if (! isset($new[$name])) {
261
+                if (!isset($new[$name])) {
262 262
                     $newFormats[$j][$name] = 0;
263 263
                 }
264 264
             }
265 265
             foreach ($strings as $name) {
266
-                if (! isset($new[$name])) {
266
+                if (!isset($new[$name])) {
267 267
                     $newFormats[$j][$name] = '';
268 268
                 }
269 269
             }
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 
284 284
         /* Add not already handled formats */
285 285
         foreach ($newFormats as $j => $new) {
286
-            if (! in_array($j, $added)) {
286
+            if (!in_array($j, $added)) {
287 287
                 $formats[] = $new;
288 288
             }
289 289
         }
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
 
411 411
                 // The options of a clause should stay on the same line and everything that follows.
412 412
                 if ($this->options['parts_newline']
413
-                    && ! $formattedOptions
413
+                    && !$formattedOptions
414 414
                     && empty(self::$INLINE_CLAUSES[$lastClause])
415 415
                     && (
416 416
                         $curr->type !== Token::TYPE_KEYWORD
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
                     if (end($blocksLineEndings) === true
463 463
                         || (
464 464
                             empty(self::$INLINE_CLAUSES[$lastClause])
465
-                            && ! $shortGroup
465
+                            && !$shortGroup
466 466
                             && $this->options['parts_newline']
467 467
                         )
468 468
                     ) {
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
                     // Also, some tokens do not have spaces before or after them.
503 503
                     if (// A space after delimiters that are longer than 2 characters.
504 504
                         $prev->keyword === 'DELIMITER'
505
-                        || ! (
505
+                        || !(
506 506
                             ($prev->type === Token::TYPE_OPERATOR && ($prev->value === '.' || $prev->value === '('))
507 507
                             // No space after . (
508 508
                             || ($curr->type === Token::TYPE_OPERATOR && ($curr->value === '.' || $curr->value === ',' || $curr->value === '(' || $curr->value === ')'))
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
                 && ($token->flags & $format['flags']) === $format['flags']
619 619
             ) {
620 620
                 // Running transformation function.
621
-                if (! empty($format['function'])) {
621
+                if (!empty($format['function'])) {
622 622
                     $func = $format['function'];
623 623
                     $text = $func($text);
624 624
                 }
Please login to merge, or discard this patch.
src/Utils/Misc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public static function getAliases($statement, $database)
30 30
     {
31
-        if (! ($statement instanceof SelectStatement)
31
+        if (!($statement instanceof SelectStatement)
32 32
             || empty($statement->expr)
33 33
             || empty($statement->from)
34 34
         ) {
@@ -48,28 +48,28 @@  discard block
 block discarded – undo
48 48
         $expressions = $statement->from;
49 49
 
50 50
         // Adding expressions from JOIN.
51
-        if (! empty($statement->join)) {
51
+        if (!empty($statement->join)) {
52 52
             foreach ($statement->join as $join) {
53 53
                 $expressions[] = $join->expr;
54 54
             }
55 55
         }
56 56
 
57 57
         foreach ($expressions as $expr) {
58
-            if (! isset($expr->table) || ($expr->table === '')) {
58
+            if (!isset($expr->table) || ($expr->table === '')) {
59 59
                 continue;
60 60
             }
61 61
 
62 62
             $thisDb = (isset($expr->database) && ($expr->database !== '')) ?
63 63
                 $expr->database : $database;
64 64
 
65
-            if (! isset($retval[$thisDb])) {
65
+            if (!isset($retval[$thisDb])) {
66 66
                 $retval[$thisDb] = array(
67 67
                     'alias' => null,
68 68
                     'tables' => array()
69 69
                 );
70 70
             }
71 71
 
72
-            if (! isset($retval[$thisDb]['tables'][$expr->table])) {
72
+            if (!isset($retval[$thisDb]['tables'][$expr->table])) {
73 73
                 $retval[$thisDb]['tables'][$expr->table] = array(
74 74
                     'alias' => (isset($expr->alias) && ($expr->alias !== '')) ?
75 75
                         $expr->alias : null,
@@ -77,14 +77,14 @@  discard block
 block discarded – undo
77 77
                 );
78 78
             }
79 79
 
80
-            if (! isset($tables[$thisDb])) {
80
+            if (!isset($tables[$thisDb])) {
81 81
                 $tables[$thisDb] = array();
82 82
             }
83 83
             $tables[$thisDb][$expr->alias] = $expr->table;
84 84
         }
85 85
 
86 86
         foreach ($statement->expr as $expr) {
87
-            if (! isset($expr->column, $expr->alias) || ($expr->column === '') || ($expr->alias === '')
87
+            if (!isset($expr->column, $expr->alias) || ($expr->column === '') || ($expr->alias === '')
88 88
             ) {
89 89
                 continue;
90 90
             }
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
@@ -55,10 +55,10 @@
 block discarded – undo
55 55
             return false;
56 56
         }
57 57
         $this->mergeLongOpts($params, $longopts);
58
-        if (! isset($params['f'])) {
58
+        if (!isset($params['f'])) {
59 59
             $params['f'] = 'cli';
60 60
         }
61
-        if (! in_array($params['f'], array('html', 'cli', 'text'))) {
61
+        if (!in_array($params['f'], array('html', 'cli', 'text'))) {
62 62
             echo "ERROR: Invalid value for format!\n";
63 63
 
64 64
             return false;
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
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
             'opts' => array()
119 119
         );
120 120
 
121
-        if (! empty($statement->parameters)) {
121
+        if (!empty($statement->parameters)) {
122 122
             $idx = 0;
123 123
             foreach ($statement->parameters as $param) {
124 124
                 $retval['dir'][$idx] = $param->inOut;
Please login to merge, or discard this patch.