From 1f3b6491b8c8d92b266722dbfd9f882f98385724 Mon Sep 17 00:00:00 2001 From: Martin Herndl Date: Tue, 23 Aug 2022 20:36:15 +0200 Subject: [PATCH] Add regression test for non-looping loops --- composer.json | 2 +- tests/Rules/Operators/data/increment-decrement.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9719717c..3f7d80ca 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ ], "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.7.15" + "phpstan/phpstan": "^1.8.3" }, "require-dev": { "nikic/php-parser": "^4.13.0", diff --git a/tests/Rules/Operators/data/increment-decrement.php b/tests/Rules/Operators/data/increment-decrement.php index f4539f19..bdb97c5f 100644 --- a/tests/Rules/Operators/data/increment-decrement.php +++ b/tests/Rules/Operators/data/increment-decrement.php @@ -58,3 +58,12 @@ ++$mixed; ++$union; })(); + + +function (): void { + for ($i = 5; $i < 4; $i++) { + } + + for ($y = 0; $y < 0; $y++) { + } +};