aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Search.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-01-10 08:13:09 +0100
committerGravatar GitHub <noreply@github.com> 2025-01-10 08:13:09 +0100
commit5368f38753a3e655ed3d7d7dfc7af2cc22de7980 (patch)
treedecb975aa750660cea965bf61399df2335493b9d /app/Models/Search.php
parent3280ec617f8081bf0d5349e441ae564a42fdc500 (diff)
Reduce undeeded use of elvis operator ?: (#7204)
Diffstat (limited to 'app/Models/Search.php')
-rw-r--r--app/Models/Search.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Models/Search.php b/app/Models/Search.php
index 3eb8b422a..5b88b1f3b 100644
--- a/app/Models/Search.php
+++ b/app/Models/Search.php
@@ -506,7 +506,7 @@ class FreshRSS_Search implements \Stringable {
$input = str_replace($matches[0], '', $input);
}
if (preg_match_all('/\\bintitle:(?P<search>[^\s"]*)/', $input, $matches)) {
- $this->intitle = array_merge($this->intitle ?: [], $matches['search']);
+ $this->intitle = array_merge($this->intitle ?? [], $matches['search']);
$input = str_replace($matches[0], '', $input);
}
$this->intitle = self::removeEmptyValues($this->intitle);
@@ -526,7 +526,7 @@ class FreshRSS_Search implements \Stringable {
$input = str_replace($matches[0], '', $input);
}
if (preg_match_all('/(?<=[\\s(]|^)[!-]intitle:(?P<search>[^\s"]*)/', $input, $matches)) {
- $this->not_intitle = array_merge($this->not_intitle ?: [], $matches['search']);
+ $this->not_intitle = array_merge($this->not_intitle ?? [], $matches['search']);
$input = str_replace($matches[0], '', $input);
}
$this->not_intitle = self::removeEmptyValues($this->not_intitle);
@@ -551,7 +551,7 @@ class FreshRSS_Search implements \Stringable {
$input = str_replace($matches[0], '', $input);
}
if (preg_match_all('/\\bauthor:(?P<search>[^\s"]*)/', $input, $matches)) {
- $this->author = array_merge($this->author ?: [], $matches['search']);
+ $this->author = array_merge($this->author ?? [], $matches['search']);
$input = str_replace($matches[0], '', $input);
}
$this->author = self::removeEmptyValues($this->author);
@@ -571,7 +571,7 @@ class FreshRSS_Search implements \Stringable {
$input = str_replace($matches[0], '', $input);
}
if (preg_match_all('/(?<=[\\s(]|^)[!-]author:(?P<search>[^\s"]*)/', $input, $matches)) {
- $this->not_author = array_merge($this->not_author ?: [], $matches['search']);
+ $this->not_author = array_merge($this->not_author ?? [], $matches['search']);
$input = str_replace($matches[0], '', $input);
}
$this->not_author = self::removeEmptyValues($this->not_author);