diff --git a/packages/NodeTypeResolver/NodeTypeResolver.php b/packages/NodeTypeResolver/NodeTypeResolver.php index b24e3b626ec..c7575d84480 100644 --- a/packages/NodeTypeResolver/NodeTypeResolver.php +++ b/packages/NodeTypeResolver/NodeTypeResolver.php @@ -245,7 +245,7 @@ final class NodeTypeResolver } public function isNumberType(Expr $expr) : bool { - $nodeType = $this->getType($expr); + $nodeType = $this->getNativeType($expr); if ($nodeType->isInteger()->yes()) { return \true; } diff --git a/rules/Php71/Rector/BinaryOp/BinaryOpBetweenNumberAndStringRector.php b/rules/Php71/Rector/BinaryOp/BinaryOpBetweenNumberAndStringRector.php index 5c965cbfcd6..23f5fda5ff7 100644 --- a/rules/Php71/Rector/BinaryOp/BinaryOpBetweenNumberAndStringRector.php +++ b/rules/Php71/Rector/BinaryOp/BinaryOpBetweenNumberAndStringRector.php @@ -88,17 +88,17 @@ CODE_SAMPLE if ($this->exprAnalyzer->isNonTypedFromParam($node->right)) { return null; } - if ($this->isStringOrStaticNonNumbericString($node->left) && $this->nodeTypeResolver->isNumberType($node->right)) { + if ($this->isStringOrStaticNonNumericString($node->left) && $this->nodeTypeResolver->isNumberType($node->right)) { $node->left = new LNumber(0); return $node; } - if ($this->isStringOrStaticNonNumbericString($node->right) && $this->nodeTypeResolver->isNumberType($node->left)) { + if ($this->isStringOrStaticNonNumericString($node->right) && $this->nodeTypeResolver->isNumberType($node->left)) { $node->right = new LNumber(0); return $node; } return null; } - private function isStringOrStaticNonNumbericString(Expr $expr) : bool + private function isStringOrStaticNonNumericString(Expr $expr) : bool { // replace only scalar values, not variables/constants/etc. if (!$expr instanceof Scalar && !$expr instanceof Variable) { diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index a8c47ae5b70..f4c20711039 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '98bb8581e5794641db7e2acf0cefa14f62f5e8a9'; + public const PACKAGE_VERSION = '5d1286061c8bf264c95085edf8b24731cf62c91e'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-10-25 15:07:54'; + public const RELEASE_DATE = '2023-10-25 20:41:16'; /** * @var int */