From b74742641f9c5dfb6077745c3c175bca6234d8e0 Mon Sep 17 00:00:00 2001 From: Alexander Kiryukhin Date: Fri, 15 May 2020 22:02:52 +0300 Subject: 7.1 downgrade --- src/NXP/Classes/Tokenizer.php | 15 ++------------- src/NXP/MathExecutor.php | 2 -- 2 files changed, 2 insertions(+), 15 deletions(-) (limited to 'src/NXP') diff --git a/src/NXP/Classes/Tokenizer.php b/src/NXP/Classes/Tokenizer.php index 869c720..b72b869 100644 --- a/src/NXP/Classes/Tokenizer.php +++ b/src/NXP/Classes/Tokenizer.php @@ -10,18 +10,6 @@ namespace NXP\Classes; -use NXP\Classes\Token\AbstractOperator; -use NXP\Classes\Token\InterfaceOperator; -use NXP\Classes\Token\InterfaceToken; -use NXP\Classes\Token\TokenComma; -use NXP\Classes\Token\TokenFunction; -use NXP\Classes\Token\TokenLeftBracket; -use NXP\Classes\Token\TokenMinus; -use NXP\Classes\Token\TokenNumber; -use NXP\Classes\Token\TokenRightBracket; -use NXP\Classes\Token\TokenStringDoubleQuoted; -use NXP\Classes\Token\TokenStringSingleQuoted; -use NXP\Classes\Token\TokenVariable; use NXP\Exception\IncorrectBracketsException; use NXP\Exception\UnknownOperatorException; use RuntimeException; @@ -80,7 +68,7 @@ class Tokenizer public function tokenize() { - foreach (mb_str_split($this->input, 1) as $ch) { + foreach (str_split($this->input, 1) as $ch) { switch (true) { case $this->inSingleQuotedString: if ($ch === "'") { @@ -111,6 +99,7 @@ class Tokenizer $this->numberBuffer .= $ch; $this->allowNegative = false; break; + /** @noinspection PhpMissingBreakStatementInspection */ case strtolower($ch) === "e": if ($this->numberBuffer != "" && strpos($this->numberBuffer, ".") !== false) { $this->numberBuffer .= "e"; diff --git a/src/NXP/MathExecutor.php b/src/NXP/MathExecutor.php index 8d3e890..a0a3f9b 100644 --- a/src/NXP/MathExecutor.php +++ b/src/NXP/MathExecutor.php @@ -14,8 +14,6 @@ namespace NXP; use NXP\Classes\Calculator; use NXP\Classes\CustomFunction; use NXP\Classes\Operator; -use NXP\Classes\Token\AbstractOperator; -use NXP\Classes\TokenFactory; use NXP\Classes\Tokenizer; use NXP\Exception\DivisionByZeroException; use ReflectionException; -- cgit v1.2.3