diff options
| author | 2023-05-11 13:02:04 +0200 | |
|---|---|---|
| committer | 2023-05-11 13:02:04 +0200 | |
| commit | 6e2f2f1c1e98ecd86aa89c6547beb742d7385d18 (patch) | |
| tree | 7ba9f5aebb01d12045b9067a86b5060ba13dca18 /app/Models/BooleanSearch.php | |
| parent | fe7d9bbcd68660a59b813346c236b61b25a51c80 (diff) | |
A few additional PHPStan rules (#5388)
A subset of
https://github.com/phpstan/phpstan-strict-rules
Diffstat (limited to 'app/Models/BooleanSearch.php')
| -rw-r--r-- | app/Models/BooleanSearch.php | 12 |
1 files changed, 6 insertions, 6 deletions
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<delim>[\'"])(?P<search>.*)(?P=delim)/U', $input, $matches)) { - $all_matches[] = $matches; + if (preg_match_all('/\bsearch:(?P<delim>[\'"])(?P<search>.*)(?P=delim)/U', $input, $matchesFound)) { + $all_matches[] = $matchesFound; } - if (preg_match_all('/\bsearch:(?P<search>[^\s"]*)/', $input, $matches)) { - $all_matches[] = $matches; + if (preg_match_all('/\bsearch:(?P<search>[^\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<search>\d+)/', $input, $matches)) { - $all_matches[] = $matches; + if (preg_match_all('/\bS:(?P<search>\d+)/', $input, $matchesFound)) { + $all_matches[] = $matchesFound; } if (!empty($all_matches)) { |
