diff options
Diffstat (limited to 'app/Models/BooleanSearch.php')
| -rw-r--r-- | app/Models/BooleanSearch.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/Models/BooleanSearch.php b/app/Models/BooleanSearch.php index 279040a5a..f2e16f972 100644 --- a/app/Models/BooleanSearch.php +++ b/app/Models/BooleanSearch.php @@ -10,10 +10,11 @@ class FreshRSS_BooleanSearch { /** @var array<FreshRSS_BooleanSearch|FreshRSS_Search> */ private $searches = array(); - /** @var string 'AND' or 'OR' or 'AND NOT' */ + /** @var 'AND'|'OR'|'AND NOT' */ private $operator; - public function __construct(string $input, int $level = 0, $operator = 'AND') { + /** @param 'AND'|'OR'|'AND NOT' $operator */ + public function __construct(string $input, int $level = 0, string $operator = 'AND') { $this->operator = $operator; $input = trim($input); if ($input == '') { @@ -221,7 +222,7 @@ class FreshRSS_BooleanSearch { return false; } - private function parseOrSegments(string $input) { + private function parseOrSegments(string $input): void { $input = trim($input); if ($input == '') { return; @@ -258,13 +259,13 @@ class FreshRSS_BooleanSearch { return $this->searches; } - /** @return string 'AND' or 'OR' depending on how this BooleanSearch should be combined */ + /** @return 'AND'|'OR'|'AND NOT' depending on how this BooleanSearch should be combined */ public function operator(): string { return $this->operator; } /** @param FreshRSS_BooleanSearch|FreshRSS_Search $search */ - public function add($search) { + public function add($search): void { $this->searches[] = $search; } |
