From be8a2828fe55f17433289a9c843576aa9d6b807e Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Tue, 27 Oct 2026 22:03:29 +0100 Subject: [PATCH] [Php71] Skip array dim fetch in BinaryOpBetweenNumberAndStringRector, element number type is phpdoc-only --- .../Fixture/skip_array_dim_fetch_phpdoc.php.inc | 15 +++++++++++++++ .../BinaryOpBetweenNumberAndStringRector.php | 6 ++++++ 2 files changed, 21 insertions(+) create mode 100644 rules-tests/Php71/Rector/BinaryOp/BinaryOpBetweenNumberAndStringRector/Fixture/skip_array_dim_fetch_phpdoc.php.inc diff --git a/rules-tests/Php71/Rector/BinaryOp/BinaryOpBetweenNumberAndStringRector/Fixture/skip_array_dim_fetch_phpdoc.php.inc b/rules-tests/Php71/Rector/BinaryOp/BinaryOpBetweenNumberAndStringRector/Fixture/skip_array_dim_fetch_phpdoc.php.inc new file mode 100644 index 00000000000..0e8d277097e --- /dev/null +++ b/rules-tests/Php71/Rector/BinaryOp/BinaryOpBetweenNumberAndStringRector/Fixture/skip_array_dim_fetch_phpdoc.php.inc @@ -0,0 +1,15 @@ +left instanceof ArrayDimFetch || $node->right instanceof ArrayDimFetch) { + return null; + } + if ($this->exprAnalyzer->isNonTypedFromParam($node->left)) { return null; }