aboutsummaryrefslogtreecommitdiff
path: root/app/Models/BooleanSearch.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-05-11 13:02:04 +0200
committerGravatar GitHub <noreply@github.com> 2023-05-11 13:02:04 +0200
commit6e2f2f1c1e98ecd86aa89c6547beb742d7385d18 (patch)
tree7ba9f5aebb01d12045b9067a86b5060ba13dca18 /app/Models/BooleanSearch.php
parentfe7d9bbcd68660a59b813346c236b61b25a51c80 (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.php12
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)) {