Phpcs fixer (#129)

* PHPCSFixer V3.23

* Run PHPCSFixer
This commit is contained in:
Bruce Wells 2023-08-18 12:11:23 -04:00 committed by GitHub
parent ad839b7858
commit 1968057f42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -148,8 +148,6 @@ $config
'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.
'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.
'no_superfluous_phpdoc_tags' => true,
// Remove trailing whitespace at the end of non-blank lines.
@ -242,6 +240,8 @@ $config
'single_quote' => true,
// Each trait `use` must be done as single statement.
'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 `!=`.
'standardize_not_equals' => true,
// Lambdas not (indirect) referencing `$this` must be declared `static`.

View file

@ -133,6 +133,7 @@ class Tokenizer
$this->allowNegative = false;
break;
/** @noinspection PhpMissingBreakStatementInspection */
case 'e' === \strtolower($ch):
if (\strlen($this->numberBuffer) && \str_contains($this->numberBuffer, '.')) {
@ -141,6 +142,7 @@ class Tokenizer
break;
}
// no break
// Intentionally fall through
case $this->isAlpha($ch):
@ -207,6 +209,7 @@ class Tokenizer
continue 2;
}
// could be in exponent, in which case negative should be added to the numberBuffer
if ($this->numberBuffer && 'e' == $this->numberBuffer[\strlen($this->numberBuffer) - 1]) {
$this->numberBuffer .= $ch;

View file

@ -1018,6 +1018,7 @@ class MathTest extends TestCase
if (\is_scalar($variable) || null === $variable) {
return;
}
// Allow variables of type DateTime, but not others
if (! $variable instanceof \DateTime) {
throw new MathExecutorException('Invalid variable type');