From 50f91584637c1db20be88c16910c21b9d2a32d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= <5175937+theofidry@users.noreply.github.com> Date: Sun, 3 Nov 2024 17:00:18 +0100 Subject: [PATCH] build(deps): Update Infection (#50) --- composer.json | 2 +- src/Parser.php | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 50a4022..0f16135 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.4", "ergebnis/composer-normalize": "^2.28", - "infection/infection": "^0.26", + "infection/infection": "^0.29", "phpunit/phpunit": "^10.3" }, "minimum-stability": "dev", diff --git a/src/Parser.php b/src/Parser.php index c67b2bd..464965d 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -128,13 +128,11 @@ private static function parseLine( private static function isRule(string $line, bool $previousMultiline): bool { - return (!str_starts_with($line, '#') - && !str_starts_with($line, "\t") - && 0 === preg_match('/\S+=.+/', $line) - ) - || ( - $previousMultiline && (str_starts_with($line, "\t") || str_starts_with($line, ' ')) - ); + return ( + !str_starts_with($line, '#') + && !str_starts_with($line, "\t") + && 0 === preg_match('/\S+=.+/', $line) + ) || $previousMultiline; } /**