@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | switch ($this->type) { |
| 223 | 223 | case self::TYPE_KEYWORD: |
| 224 | 224 | $this->keyword = strtoupper($this->token); |
| 225 | - if (! ($this->flags & self::FLAG_KEYWORD_RESERVED)) { |
|
| 225 | + if (!($this->flags & self::FLAG_KEYWORD_RESERVED)) { |
|
| 226 | 226 | // Unreserved keywords should stay the way they are because they |
| 227 | 227 | // might represent field names. |
| 228 | 228 | return $this->token; |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | || ($this->flags & self::FLAG_NUMBER_FLOAT) |
| 247 | 247 | ) { |
| 248 | 248 | $ret = (float) $ret; |
| 249 | - } elseif (! ($this->flags & self::FLAG_NUMBER_BINARY)) { |
|
| 249 | + } elseif (!($this->flags & self::FLAG_NUMBER_BINARY)) { |
|
| 250 | 250 | $ret = (int) $ret; |
| 251 | 251 | } |
| 252 | 252 | |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | // in PHP 5.3- the `null` parameter isn't handled correctly. |
| 280 | 280 | $str = mb_substr( |
| 281 | 281 | $str, |
| 282 | - ! empty($str[1]) && ($str[1] === '@') ? 2 : 1, |
|
| 282 | + !empty($str[1]) && ($str[1] === '@') ? 2 : 1, |
|
| 283 | 283 | mb_strlen($str), |
| 284 | 284 | 'UTF-8' |
| 285 | 285 | ); |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | $str = strtoupper($str); |
| 278 | 278 | |
| 279 | 279 | if (isset(static::$KEYWORDS[$str])) { |
| 280 | - if ($isReserved && ! (static::$KEYWORDS[$str] & Token::FLAG_KEYWORD_RESERVED)) { |
|
| 280 | + if ($isReserved && !(static::$KEYWORDS[$str] & Token::FLAG_KEYWORD_RESERVED)) { |
|
| 281 | 281 | return null; |
| 282 | 282 | } |
| 283 | 283 | |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | */ |
| 300 | 300 | public static function isOperator($str) |
| 301 | 301 | { |
| 302 | - if (! isset(static::$OPERATORS[$str])) { |
|
| 302 | + if (!isset(static::$OPERATORS[$str])) { |
|
| 303 | 303 | return null; |
| 304 | 304 | } |
| 305 | 305 | |
@@ -501,7 +501,7 @@ discard block |
||
| 501 | 501 | $context = self::$contextPrefix . $context; |
| 502 | 502 | } |
| 503 | 503 | |
| 504 | - if (! class_exists($context)) { |
|
| 504 | + if (!class_exists($context)) { |
|
| 505 | 505 | throw @new LoaderException( |
| 506 | 506 | 'Specified context ("' . $context . '") does not exist.', |
| 507 | 507 | $context |
@@ -540,7 +540,7 @@ discard block |
||
| 540 | 540 | $i -= 2; |
| 541 | 541 | $part = substr($context, $i, 2); |
| 542 | 542 | /* No more numeric parts to strip */ |
| 543 | - if (! is_numeric($part)) { |
|
| 543 | + if (!is_numeric($part)) { |
|
| 544 | 544 | break 2; |
| 545 | 545 | } |
| 546 | 546 | } while (intval($part) === 0 && $i > 0); |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | } |
| 597 | 597 | |
| 598 | 598 | if ((static::$MODE & self::SQL_MODE_NO_ENCLOSING_QUOTES) |
| 599 | - && (! static::isKeyword($str, true)) |
|
| 599 | + && (!static::isKeyword($str, true)) |
|
| 600 | 600 | ) { |
| 601 | 601 | return $str; |
| 602 | 602 | } |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | $state = 3; |
| 160 | 160 | } elseif (($token->value === ',') || ($token->value === ')')) { |
| 161 | 161 | $state = $token->value === ',' ? 2 : 4; |
| 162 | - if (! empty($lastColumn)) { |
|
| 162 | + if (!empty($lastColumn)) { |
|
| 163 | 163 | $ret->columns[] = $lastColumn; |
| 164 | 164 | $lastColumn = []; |
| 165 | 165 | } |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | public static function build($component, array $options = []) |
| 195 | 195 | { |
| 196 | 196 | $ret = $component->type . ' '; |
| 197 | - if (! empty($component->name)) { |
|
| 197 | + if (!empty($component->name)) { |
|
| 198 | 198 | $ret .= Context::escape($component->name) . ' '; |
| 199 | 199 | } |
| 200 | 200 | |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | if ($state === 0) { |
| 129 | 129 | $ret->name = strtoupper((string) $token->value); |
| 130 | - if (($token->type !== Token::TYPE_KEYWORD) || (! ($token->flags & Token::FLAG_KEYWORD_DATA_TYPE))) { |
|
| 130 | + if (($token->type !== Token::TYPE_KEYWORD) || (!($token->flags & Token::FLAG_KEYWORD_DATA_TYPE))) { |
|
| 131 | 131 | $parser->error('Unrecognized data type.', $token); |
| 132 | 132 | } |
| 133 | 133 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | $component->name : strtolower($component->name); |
| 168 | 168 | |
| 169 | 169 | $parameters = ''; |
| 170 | - if (! empty($component->parameters)) { |
|
| 170 | + if (!empty($component->parameters)) { |
|
| 171 | 171 | $parameters = '(' . implode(',', $component->parameters) . ')'; |
| 172 | 172 | } |
| 173 | 173 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | $state = 4; |
| 245 | 245 | } elseif ($token->type === Token::TYPE_SYMBOL || $token->type === Token::TYPE_NONE) { |
| 246 | 246 | $expr->name = $token->value; |
| 247 | - if (! $expr->isConstraint) { |
|
| 247 | + if (!$expr->isConstraint) { |
|
| 248 | 248 | $state = 2; |
| 249 | 249 | } |
| 250 | 250 | } elseif ($token->type === Token::TYPE_KEYWORD) { |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | |
| 289 | 289 | $state = 5; |
| 290 | 290 | } elseif ($state === 5) { |
| 291 | - if (! empty($expr->type) || ! empty($expr->key)) { |
|
| 291 | + if (!empty($expr->type) || !empty($expr->key)) { |
|
| 292 | 292 | $ret[] = $expr; |
| 293 | 293 | } |
| 294 | 294 | |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | } |
| 312 | 312 | |
| 313 | 313 | // Last iteration was not saved. |
| 314 | - if (! empty($expr->type) || ! empty($expr->key)) { |
|
| 314 | + if (!empty($expr->type) || !empty($expr->key)) { |
|
| 315 | 315 | $ret[] = $expr; |
| 316 | 316 | } |
| 317 | 317 | |
@@ -349,18 +349,18 @@ discard block |
||
| 349 | 349 | $tmp .= Context::escape($component->name) . ' '; |
| 350 | 350 | } |
| 351 | 351 | |
| 352 | - if (! empty($component->type)) { |
|
| 352 | + if (!empty($component->type)) { |
|
| 353 | 353 | $tmp .= DataType::build( |
| 354 | 354 | $component->type, |
| 355 | 355 | ['lowercase' => true] |
| 356 | 356 | ) . ' '; |
| 357 | 357 | } |
| 358 | 358 | |
| 359 | - if (! empty($component->key)) { |
|
| 359 | + if (!empty($component->key)) { |
|
| 360 | 360 | $tmp .= $component->key . ' '; |
| 361 | 361 | } |
| 362 | 362 | |
| 363 | - if (! empty($component->references)) { |
|
| 363 | + if (!empty($component->references)) { |
|
| 364 | 364 | $tmp .= 'REFERENCES ' . $component->references . ' '; |
| 365 | 365 | } |
| 366 | 366 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | } elseif (($token->type === Token::TYPE_OPERATOR) |
| 100 | 100 | && ($token->value === ',') |
| 101 | 101 | ) { |
| 102 | - if (! empty($expr->expr)) { |
|
| 102 | + if (!empty($expr->expr)) { |
|
| 103 | 103 | $ret[] = $expr; |
| 104 | 104 | } |
| 105 | 105 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | // Last iteration was not processed. |
| 115 | - if (! empty($expr->expr)) { |
|
| 115 | + if (!empty($expr->expr)) { |
|
| 116 | 116 | $ret[] = $expr; |
| 117 | 117 | } |
| 118 | 118 | |
@@ -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 @@ discard block |
||
| 99 | 99 | } elseif (($token->type === Token::TYPE_OPERATOR) |
| 100 | 100 | && ($token->value === ',') |
| 101 | 101 | ) { |
| 102 | - if (! empty($expr->expr)) { |
|
| 102 | + if (!empty($expr->expr)) { |
|
| 103 | 103 | $ret[] = $expr; |
| 104 | 104 | } |
| 105 | 105 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | // Last iteration was not processed. |
| 115 | - if (! empty($expr->expr)) { |
|
| 115 | + if (!empty($expr->expr)) { |
|
| 116 | 116 | $ret[] = $expr; |
| 117 | 117 | } |
| 118 | 118 | |