parent
ad839b7858
commit
1968057f42
3 changed files with 6 additions and 2 deletions
|
@ -148,8 +148,6 @@ $config
|
||||||
'no_short_bool_cast' => true,
|
'no_short_bool_cast' => true,
|
||||||
// When making a method or function call, there MUST NOT be a space between the method or function name and the opening parenthesis.
|
// When making a method or function call, there MUST NOT be a space between the method or function name and the opening parenthesis.
|
||||||
'no_spaces_after_function_name' => true,
|
'no_spaces_after_function_name' => true,
|
||||||
// There MUST NOT be a space after the opening parenthesis. There MUST NOT be a space before the closing parenthesis.
|
|
||||||
'no_spaces_inside_parenthesis' => true,
|
|
||||||
// Removes `@param`, `@return` and `@var` tags that don't provide any useful information.
|
// Removes `@param`, `@return` and `@var` tags that don't provide any useful information.
|
||||||
'no_superfluous_phpdoc_tags' => true,
|
'no_superfluous_phpdoc_tags' => true,
|
||||||
// Remove trailing whitespace at the end of non-blank lines.
|
// Remove trailing whitespace at the end of non-blank lines.
|
||||||
|
@ -242,6 +240,8 @@ $config
|
||||||
'single_quote' => true,
|
'single_quote' => true,
|
||||||
// Each trait `use` must be done as single statement.
|
// Each trait `use` must be done as single statement.
|
||||||
'single_trait_insert_per_statement' => true,
|
'single_trait_insert_per_statement' => true,
|
||||||
|
// There MUST NOT be a space after the opening parenthesis. There MUST NOT be a space before the closing parenthesis.
|
||||||
|
'spaces_inside_parentheses' => false,
|
||||||
// Replace all `<>` with `!=`.
|
// Replace all `<>` with `!=`.
|
||||||
'standardize_not_equals' => true,
|
'standardize_not_equals' => true,
|
||||||
// Lambdas not (indirect) referencing `$this` must be declared `static`.
|
// Lambdas not (indirect) referencing `$this` must be declared `static`.
|
||||||
|
|
|
@ -133,6 +133,7 @@ class Tokenizer
|
||||||
$this->allowNegative = false;
|
$this->allowNegative = false;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/** @noinspection PhpMissingBreakStatementInspection */
|
/** @noinspection PhpMissingBreakStatementInspection */
|
||||||
case 'e' === \strtolower($ch):
|
case 'e' === \strtolower($ch):
|
||||||
if (\strlen($this->numberBuffer) && \str_contains($this->numberBuffer, '.')) {
|
if (\strlen($this->numberBuffer) && \str_contains($this->numberBuffer, '.')) {
|
||||||
|
@ -141,6 +142,7 @@ class Tokenizer
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// no break
|
// no break
|
||||||
// Intentionally fall through
|
// Intentionally fall through
|
||||||
case $this->isAlpha($ch):
|
case $this->isAlpha($ch):
|
||||||
|
@ -207,6 +209,7 @@ class Tokenizer
|
||||||
|
|
||||||
continue 2;
|
continue 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// could be in exponent, in which case negative should be added to the numberBuffer
|
// could be in exponent, in which case negative should be added to the numberBuffer
|
||||||
if ($this->numberBuffer && 'e' == $this->numberBuffer[\strlen($this->numberBuffer) - 1]) {
|
if ($this->numberBuffer && 'e' == $this->numberBuffer[\strlen($this->numberBuffer) - 1]) {
|
||||||
$this->numberBuffer .= $ch;
|
$this->numberBuffer .= $ch;
|
||||||
|
|
|
@ -1018,6 +1018,7 @@ class MathTest extends TestCase
|
||||||
if (\is_scalar($variable) || null === $variable) {
|
if (\is_scalar($variable) || null === $variable) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow variables of type DateTime, but not others
|
// Allow variables of type DateTime, but not others
|
||||||
if (! $variable instanceof \DateTime) {
|
if (! $variable instanceof \DateTime) {
|
||||||
throw new MathExecutorException('Invalid variable type');
|
throw new MathExecutorException('Invalid variable type');
|
||||||
|
|
Loading…
Reference in a new issue