diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2020-05-15 22:02:52 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2020-05-15 22:02:52 +0300 |
commit | b74742641f9c5dfb6077745c3c175bca6234d8e0 (patch) | |
tree | 3b970b76e5c41df98a02c6ed1de12bb20e65fd82 /src/NXP | |
parent | e6f35cd802c611194901db7ca53c8151af931e22 (diff) |
7.1 downgrade
Diffstat (limited to 'src/NXP')
-rw-r--r-- | src/NXP/Classes/Tokenizer.php | 15 | ||||
-rw-r--r-- | src/NXP/MathExecutor.php | 2 |
2 files changed, 2 insertions, 15 deletions
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; |