@@ -56,8 +56,8 @@ discard block |
||
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | // Flags. |
| 59 | - return ! isset($pattern['flags']) |
|
| 60 | - || (! (($pattern['flags'] & $token->flags) === 0)); |
|
| 59 | + return !isset($pattern['flags']) |
|
| 60 | + || (!(($pattern['flags'] & $token->flags) === 0)); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $isList = $list instanceof TokensList; |
| 76 | 76 | |
| 77 | 77 | // Parsing the tokens. |
| 78 | - if (! $isList) { |
|
| 78 | + if (!$isList) { |
|
| 79 | 79 | $list = Lexer::getTokens($list); |
| 80 | 80 | } |
| 81 | 81 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | ++$j; |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - if (! static::match($list->tokens[$j], $find[$k])) { |
|
| 138 | + if (!static::match($list->tokens[$j], $find[$k])) { |
|
| 139 | 139 | // This token does not match the pattern. |
| 140 | 140 | break; |
| 141 | 141 | } |
@@ -180,7 +180,7 @@ |
||
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | ++$list->idx; |
| 183 | - if (! isset($list->tokens[$list->idx])) { |
|
| 183 | + if (!isset($list->tokens[$list->idx])) { |
|
| 184 | 184 | break; |
| 185 | 185 | } |
| 186 | 186 | |
@@ -22,7 +22,6 @@ |
||
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * `WITH` statement. |
| 25 | - |
|
| 26 | 25 | * WITH [RECURSIVE] query_name [ (column_name [,...]) ] AS (SELECT ...) [, ...] |
| 27 | 26 | */ |
| 28 | 27 | final class WithStatement extends Statement |
@@ -38,11 +38,11 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | public static function build($component, array $options = []) |
| 40 | 40 | { |
| 41 | - if (! $component instanceof WithKeyword) { |
|
| 41 | + if (!$component instanceof WithKeyword) { |
|
| 42 | 42 | throw new RuntimeException('Can not build a component that is not a WithKeyword'); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - if (! isset($component->statement)) { |
|
| 45 | + if (!isset($component->statement)) { |
|
| 46 | 46 | throw new RuntimeException('No statement inside WITH'); |
| 47 | 47 | } |
| 48 | 48 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | { |
| 36 | 36 | foreach ($longopts as $value) { |
| 37 | 37 | $value = rtrim($value, ':'); |
| 38 | - if (! isset($params[$value])) { |
|
| 38 | + if (!isset($params[$value])) { |
|
| 39 | 39 | continue; |
| 40 | 40 | } |
| 41 | 41 | |
@@ -83,11 +83,11 @@ discard block |
||
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | $this->mergeLongOpts($params, $longopts); |
| 86 | - if (! isset($params['f'])) { |
|
| 86 | + if (!isset($params['f'])) { |
|
| 87 | 87 | $params['f'] = 'cli'; |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | - if (! in_array($params['f'], ['html', 'cli', 'text'])) { |
|
| 90 | + if (!in_array($params['f'], ['html', 'cli', 'text'])) { |
|
| 91 | 91 | echo "ERROR: Invalid value for format!\n"; |
| 92 | 92 | |
| 93 | 93 | return false; |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | return 0; |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - if (! isset($params['q'])) { |
|
| 115 | + if (!isset($params['q'])) { |
|
| 116 | 116 | $stdIn = $this->readStdin(); |
| 117 | 117 | |
| 118 | 118 | if ($stdIn) { |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | Context::load($params['c']); |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | - if (! isset($params['q'])) { |
|
| 191 | + if (!isset($params['q'])) { |
|
| 192 | 192 | $stdIn = $this->readStdin(); |
| 193 | 193 | |
| 194 | 194 | if ($stdIn) { |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | return 0; |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | - if (! isset($params['q'])) { |
|
| 267 | + if (!isset($params['q'])) { |
|
| 268 | 268 | $stdIn = $this->readStdin(); |
| 269 | 269 | |
| 270 | 270 | if ($stdIn) { |
@@ -278,7 +278,7 @@ |
||
| 278 | 278 | public static function build($component, array $options = []) |
| 279 | 279 | { |
| 280 | 280 | if ($component->dest instanceof Expression) { |
| 281 | - $columns = ! empty($component->columns) ? '(`' . implode('`, `', $component->columns) . '`)' : ''; |
|
| 281 | + $columns = !empty($component->columns) ? '(`' . implode('`, `', $component->columns) . '`)' : ''; |
|
| 282 | 282 | |
| 283 | 283 | return $component->dest . $columns; |
| 284 | 284 | } |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | } |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | - if (! empty($expr->type)) { |
|
| 198 | + if (!empty($expr->type)) { |
|
| 199 | 199 | $ret[] = $expr; |
| 200 | 200 | } |
| 201 | 201 | |
@@ -215,9 +215,9 @@ discard block |
||
| 215 | 215 | $ret = []; |
| 216 | 216 | foreach ($component as $c) { |
| 217 | 217 | $ret[] = array_search($c->type, static::$JOINS) . ' ' . $c->expr |
| 218 | - . (! empty($c->on) |
|
| 218 | + . (!empty($c->on) |
|
| 219 | 219 | ? ' ON ' . Condition::build($c->on) : '') |
| 220 | - . (! empty($c->using) |
|
| 220 | + . (!empty($c->using) |
|
| 221 | 221 | ? ' USING ' . ArrayObj::build($c->using) : ''); |
| 222 | 222 | } |
| 223 | 223 | |
@@ -181,7 +181,7 @@ |
||
| 181 | 181 | return implode(', ', $component); |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | - if (! empty($component->raw)) { |
|
| 184 | + if (!empty($component->raw)) { |
|
| 185 | 185 | return '(' . implode(', ', $component->raw) . ')'; |
| 186 | 186 | } |
| 187 | 187 | |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | if ($state === 1) { |
| 102 | - if (! $this->isLock) { |
|
| 102 | + if (!$this->isLock) { |
|
| 103 | 103 | // UNLOCK statement should not have any more tokens |
| 104 | 104 | $parser->error('Unexpected token.', $token); |
| 105 | 105 | break; |
@@ -27,15 +27,15 @@ |
||
| 27 | 27 | $debug = empty($argv[3]) ? null : rtrim($argv[3], '/'); |
| 28 | 28 | |
| 29 | 29 | // Checking if all directories are valid. |
| 30 | -if (! is_dir($input)) { |
|
| 30 | +if (!is_dir($input)) { |
|
| 31 | 31 | throw new Exception('The input directory does not exist.'); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | -if (! is_dir($output)) { |
|
| 34 | +if (!is_dir($output)) { |
|
| 35 | 35 | throw new Exception('The output directory does not exist.'); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | -if (($debug !== null) && (! is_dir($debug))) { |
|
| 38 | +if (($debug !== null) && (!is_dir($debug))) { |
|
| 39 | 39 | throw new Exception('The debug directory does not exist.'); |
| 40 | 40 | } |
| 41 | 41 | |