diff options
| author | 2023-03-31 08:23:39 +0200 | |
|---|---|---|
| committer | 2023-03-31 08:23:39 +0200 | |
| commit | 288ed04ccc30b58373576dc3be811aee43e67034 (patch) | |
| tree | 27f4c571e04d64c97737416dfa2b8d65f481dfd8 /app/Models/BooleanSearch.php | |
| parent | c9d5fe2da12cbc3a071ebf9a518afe2789bb3d61 (diff) | |
PHPStan level 6 for all PDO and Exception classes (#5239)
* PHPStan level 6 for all PDO and Exception classes
Contributes to https://github.com/FreshRSS/FreshRSS/issues/4112
* Fix type
* Now also our remaining own librairies
* Motivation for a few more files
* A few more DAO classes
* Last interface
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; } |
