From 6e2f2f1c1e98ecd86aa89c6547beb742d7385d18 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 11 May 2023 13:02:04 +0200 Subject: A few additional PHPStan rules (#5388) A subset of https://github.com/phpstan/phpstan-strict-rules --- app/Models/BooleanSearch.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'app/Models/BooleanSearch.php') diff --git a/app/Models/BooleanSearch.php b/app/Models/BooleanSearch.php index ea03165d5..d4d8a42ab 100644 --- a/app/Models/BooleanSearch.php +++ b/app/Models/BooleanSearch.php @@ -43,12 +43,12 @@ class FreshRSS_BooleanSearch { */ private function parseUserQueryNames(string $input): string { $all_matches = []; - if (preg_match_all('/\bsearch:(?P[\'"])(?P.*)(?P=delim)/U', $input, $matches)) { - $all_matches[] = $matches; + if (preg_match_all('/\bsearch:(?P[\'"])(?P.*)(?P=delim)/U', $input, $matchesFound)) { + $all_matches[] = $matchesFound; } - if (preg_match_all('/\bsearch:(?P[^\s"]*)/', $input, $matches)) { - $all_matches[] = $matches; + if (preg_match_all('/\bsearch:(?P[^\s"]*)/', $input, $matchesFound)) { + $all_matches[] = $matchesFound; } if (!empty($all_matches)) { @@ -82,8 +82,8 @@ class FreshRSS_BooleanSearch { private function parseUserQueryIds(string $input): string { $all_matches = []; - if (preg_match_all('/\bS:(?P\d+)/', $input, $matches)) { - $all_matches[] = $matches; + if (preg_match_all('/\bS:(?P\d+)/', $input, $matchesFound)) { + $all_matches[] = $matchesFound; } if (!empty($all_matches)) { -- cgit v1.2.3