From 288ed04ccc30b58373576dc3be811aee43e67034 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 31 Mar 2023 08:23:39 +0200 Subject: 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 --- app/Models/BooleanSearch.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'app/Models/BooleanSearch.php') 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 */ 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; } -- cgit v1.2.3