aboutsummaryrefslogtreecommitdiff
path: root/app/Models/UserQuery.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-06-09 20:32:12 +0200
committerGravatar GitHub <noreply@github.com> 2024-06-09 20:32:12 +0200
commit5b28a35003a015e29770094932157f13a3f7f5c0 (patch)
tree4cbe4100379ca0d148115ad31f5a1c0c95ff7c80 /app/Models/UserQuery.php
parente98c57841b843ed881f06ce6ed1c9c89942c27b8 (diff)
Pass PHPStan level 9 (#6544)
* More PHPStan * More, passing * 4 more files * Update to PHPStan 1.11.4 Needed for fixed bug: Consider numeric-string types after string concat https://github.com/phpstan/phpstan/releases/tag/1.11.4 * Pass PHPStan level 9 Start tracking booleansInConditions * Fix mark as read * Fix doctype * ctype_digit
Diffstat (limited to 'app/Models/UserQuery.php')
-rw-r--r--app/Models/UserQuery.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/Models/UserQuery.php b/app/Models/UserQuery.php
index 73bf52ef8..3058483d3 100644
--- a/app/Models/UserQuery.php
+++ b/app/Models/UserQuery.php
@@ -41,7 +41,8 @@ class FreshRSS_UserQuery {
}
/**
- * @param array{get?:string,name?:string,order?:string,search?:string,state?:int,url?:string,token?:string,shareRss?:bool,shareOpml?:bool} $query
+ * @param array{get?:string,name?:string,order?:string,search?:string,state?:int,url?:string,token?:string,
+ * shareRss?:bool,shareOpml?:bool,description?:string,imageUrl?:string} $query
* @param array<int,FreshRSS_Category> $categories
* @param array<int,FreshRSS_Tag> $labels
*/
@@ -61,8 +62,13 @@ class FreshRSS_UserQuery {
}
if (empty($query['url'])) {
if (!empty($query)) {
- unset($query['name']);
- $this->url = Minz_Url::display(['params' => $query]);
+ $link = $query;
+ unset($link['description']);
+ unset($link['imageUrl']);
+ unset($link['name']);
+ unset($link['shareOpml']);
+ unset($link['shareRss']);
+ $this->url = Minz_Url::display(['params' => $link]);
}
} else {
$this->url = $query['url'];