@@ -156,7 +156,7 @@ |
||
| 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 | |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | |
| 314 | 314 | // Parsing the delimiter. |
| 315 | 315 | $delimiter = ''; |
| 316 | - while (($i < $len) && (! Context::isWhitespace($this->query[$i]))) { |
|
| 316 | + while (($i < $len) && (!Context::isWhitespace($this->query[$i]))) { |
|
| 317 | 317 | $delimiter .= $this->query[$i++]; |
| 318 | 318 | } |
| 319 | 319 | |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | |
| 328 | 328 | // Whether this statement should be returned or not. |
| 329 | 329 | $ret = ''; |
| 330 | - if (! empty($this->options['parse_delimiter'])) { |
|
| 330 | + if (!empty($this->options['parse_delimiter'])) { |
|
| 331 | 331 | // Appending the `DELIMITER` statement that was just |
| 332 | 332 | // found to the current statement. |
| 333 | 333 | $ret = trim( |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | $ret = $this->current; |
| 370 | 370 | |
| 371 | 371 | // If needed, adds a delimiter at the end of the statement. |
| 372 | - if (! empty($this->options['add_delimiter'])) { |
|
| 372 | + if (!empty($this->options['add_delimiter'])) { |
|
| 373 | 373 | $ret .= $this->delimiter; |
| 374 | 374 | } |
| 375 | 375 | |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | 'opts' => [], |
| 118 | 118 | ]; |
| 119 | 119 | |
| 120 | - if (! empty($statement->parameters)) { |
|
| 120 | + if (!empty($statement->parameters)) { |
|
| 121 | 121 | $idx = 0; |
| 122 | 122 | foreach ($statement->parameters as $param) { |
| 123 | 123 | $retval['dir'][$idx] = $param->inOut; |
@@ -249,7 +249,7 @@ |
||
| 249 | 249 | return trim( |
| 250 | 250 | 'PARTITION ' . $component->name |
| 251 | 251 | . (empty($component->type) ? '' : ' VALUES ' . $component->type . ' ' . $component->expr . ' ') |
| 252 | - . (! empty($component->options) && ! empty($component->type) ? '' : ' ') |
|
| 252 | + . (!empty($component->options) && !empty($component->type) ? '' : ' ') |
|
| 253 | 253 | . $component->options . $subpartitions |
| 254 | 254 | ); |
| 255 | 255 | } |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | $value = strtoupper($value); |
| 175 | - if (! isset($types[$value])) { |
|
| 175 | + if (!isset($types[$value])) { |
|
| 176 | 176 | $types[$value] = $type; |
| 177 | 177 | } else { |
| 178 | 178 | $types[$value] |= $type; |
@@ -182,11 +182,11 @@ discard block |
||
| 182 | 182 | $ret = []; |
| 183 | 183 | foreach ($types as $word => $type) { |
| 184 | 184 | $len = strlen($word); |
| 185 | - if (! isset($ret[$type])) { |
|
| 185 | + if (!isset($ret[$type])) { |
|
| 186 | 186 | $ret[$type] = []; |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - if (! isset($ret[$type][$len])) { |
|
| 189 | + if (!isset($ret[$type][$len])) { |
|
| 190 | 190 | $ret[$type][$len] = []; |
| 191 | 191 | } |
| 192 | 192 | |
@@ -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 | |
@@ -26,11 +26,11 @@ |
||
| 26 | 26 | $output = rtrim($argv[2], '/'); |
| 27 | 27 | |
| 28 | 28 | // Checking if all directories are valid. |
| 29 | -if (! is_dir($input)) { |
|
| 29 | +if (!is_dir($input)) { |
|
| 30 | 30 | throw new Exception('The input directory does not exist.'); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | -if (! is_dir($output)) { |
|
| 33 | +if (!is_dir($output)) { |
|
| 34 | 34 | throw new Exception('The output directory does not exist.'); |
| 35 | 35 | } |
| 36 | 36 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | |
| 124 | 124 | if ($lastOption === null) { |
| 125 | 125 | $upper = strtoupper($token->token); |
| 126 | - if (! isset($options[$upper])) { |
|
| 126 | + if (!isset($options[$upper])) { |
|
| 127 | 127 | // There is no option to be processed. |
| 128 | 128 | break; |
| 129 | 129 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | if ($state === 0) { |
| 163 | - if (! is_array($lastOption)) { |
|
| 163 | + if (!is_array($lastOption)) { |
|
| 164 | 164 | // This is a just keyword option without any value. |
| 165 | 165 | // This is the beginning and the end of it. |
| 166 | 166 | $ret->options[$lastOptionId] = $token->value; |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | $ret->options[$lastOptionId]['expr'] .= $token->token; |
| 235 | 235 | |
| 236 | 236 | if ( |
| 237 | - ! (($token->token === '(') && ($brackets === 1) |
|
| 237 | + !(($token->token === '(') && ($brackets === 1) |
|
| 238 | 238 | || (($token->token === ')') && ($brackets === 0))) |
| 239 | 239 | ) { |
| 240 | 240 | // First pair of brackets is being skipped. |
@@ -292,12 +292,12 @@ discard block |
||
| 292 | 292 | |
| 293 | 293 | $options = []; |
| 294 | 294 | foreach ($component->options as $option) { |
| 295 | - if (! is_array($option)) { |
|
| 295 | + if (!is_array($option)) { |
|
| 296 | 296 | $options[] = $option; |
| 297 | 297 | } else { |
| 298 | 298 | $options[] = $option['name'] |
| 299 | - . (! empty($option['equals']) && $option['equals'] ? '=' : ' ') |
|
| 300 | - . (! empty($option['expr']) ? $option['expr'] : $option['value']); |
|
| 299 | + . (!empty($option['equals']) && $option['equals'] ? '=' : ' ') |
|
| 300 | + . (!empty($option['expr']) ? $option['expr'] : $option['value']); |
|
| 301 | 301 | } |
| 302 | 302 | } |
| 303 | 303 | |
@@ -317,10 +317,10 @@ discard block |
||
| 317 | 317 | { |
| 318 | 318 | foreach ($this->options as $option) { |
| 319 | 319 | if (is_array($option)) { |
| 320 | - if (! strcasecmp($key, $option['name'])) { |
|
| 320 | + if (!strcasecmp($key, $option['name'])) { |
|
| 321 | 321 | return $getExpr ? $option['expr'] : $option['value']; |
| 322 | 322 | } |
| 323 | - } elseif (! strcasecmp($key, $option)) { |
|
| 323 | + } elseif (!strcasecmp($key, $option)) { |
|
| 324 | 324 | return true; |
| 325 | 325 | } |
| 326 | 326 | } |
@@ -339,12 +339,12 @@ discard block |
||
| 339 | 339 | { |
| 340 | 340 | foreach ($this->options as $idx => $option) { |
| 341 | 341 | if (is_array($option)) { |
| 342 | - if (! strcasecmp($key, $option['name'])) { |
|
| 342 | + if (!strcasecmp($key, $option['name'])) { |
|
| 343 | 343 | unset($this->options[$idx]); |
| 344 | 344 | |
| 345 | 345 | return true; |
| 346 | 346 | } |
| 347 | - } elseif (! strcasecmp($key, $option)) { |
|
| 347 | + } elseif (!strcasecmp($key, $option)) { |
|
| 348 | 348 | unset($this->options[$idx]); |
| 349 | 349 | |
| 350 | 350 | return true; |