aboutsummaryrefslogtreecommitdiff
path: root/app/Models/UserQuery.php
diff options
context:
space:
mode:
authorGravatar Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> 2024-11-28 17:11:04 +0100
committerGravatar GitHub <noreply@github.com> 2024-11-28 17:11:04 +0100
commit15745d42b779ad14efde2932ab116f45eee39246 (patch)
tree2528a36184d8152d4f2d90dc73df680f84bbe1d1 /app/Models/UserQuery.php
parent604b186638276203c8495a3ee86da0cc240ab4d0 (diff)
Upgrade code to php 8.1 (#6748)
* revert Fix code indentation Fix code Upgrade code to php 8.1 * fix remarques * code review * code review * code review * Apply suggestions from code review * code review * Fixes * Many remainging updates of array syntax * Lost case 'reading-list' * Uneeded PHPDoc --------- Co-authored-by: Luc Sanchez <l.sanchez-prestataire@alptis.fr> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/Models/UserQuery.php')
-rw-r--r--app/Models/UserQuery.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/app/Models/UserQuery.php b/app/Models/UserQuery.php
index 1ec8ee148..d3a56bb6a 100644
--- a/app/Models/UserQuery.php
+++ b/app/Models/UserQuery.php
@@ -8,7 +8,6 @@ declare(strict_types=1);
* easy way.
*/
class FreshRSS_UserQuery {
-
private bool $deprecated = false;
private string $get = '';
private string $get_name = '';
@@ -16,16 +15,12 @@ class FreshRSS_UserQuery {
/** XML-encoded name */
private string $name = '';
private string $order = '';
- private FreshRSS_BooleanSearch $search;
+ private readonly FreshRSS_BooleanSearch $search;
private int $state = 0;
private string $url = '';
private string $token = '';
private bool $shareRss = false;
private bool $shareOpml = false;
- /** @var array<int,FreshRSS_Category> $categories */
- private array $categories;
- /** @var array<int,FreshRSS_Tag> $labels */
- private array $labels;
/** XML-encoded description */
private string $description = '';
private string $imageUrl = '';
@@ -48,9 +43,11 @@ class FreshRSS_UserQuery {
* @param array<int,FreshRSS_Category> $categories
* @param array<int,FreshRSS_Tag> $labels
*/
- public function __construct(array $query, array $categories, array $labels) {
- $this->categories = $categories;
- $this->labels = $labels;
+ public function __construct(
+ array $query,
+ private array $categories,
+ private array $labels,
+ ) {
if (isset($query['get'])) {
$this->parseGet($query['get']);
} else {