mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-25 08:47:52 -04:00
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>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user