From 06d00995049db9c7b915f67cfd4a5708aace458f Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 30 Oct 2023 20:47:27 +0100 Subject: Require PHP 7.4+ (#5720) * Require PHP 7.4+ https://github.com/FreshRSS/FreshRSS/discussions/5474 * Update Docker oldest Alpine 3.13 with PHP 7.4.26 * Add missing packets to Docker oldest * Update to typed properties https://php.net/migration74.new-features#migration74.new-features.core.typed-properties * More types --- app/Models/Share.php | 46 ++++++++++++++++------------------------------ 1 file changed, 16 insertions(+), 30 deletions(-) (limited to 'app/Models/Share.php') diff --git a/app/Models/Share.php b/app/Models/Share.php index ae2c4a6b8..b0665a07c 100644 --- a/app/Models/Share.php +++ b/app/Models/Share.php @@ -8,7 +8,7 @@ class FreshRSS_Share { * The list of available sharing options. * @var array */ - private static $list_sharing = []; + private static array $list_sharing = []; /** * Register a new sharing option. @@ -71,45 +71,31 @@ class FreshRSS_Share { } - /** @var string */ - private $type; - /** @var string */ - private $name; - /** @var string */ - private $url_transform; + private string $type; + private string $name; + private string $url_transform; /** @var array|array> */ - private $transforms; + private array $transforms; /** * @phpstan-var 'simple'|'advanced' - * @var string */ - private $form_type; - /** @var string */ - private $help_url; - /** @var string|null */ - private $custom_name = null; - /** @var string|null */ - private $base_url = null; - /** @var string|null */ - private $id = null; - /** @var string|null */ - private $title = null; - /** @var string|null */ - private $link = null; - /** @var bool */ - private $isDeprecated; + private string $form_type; + private string $help_url; + private ?string $custom_name = null; + private ?string $base_url = null; + private ?string $id = null; + private ?string $title = null; + private ?string $link = null; + private bool $isDeprecated; /** * @phpstan-var 'GET'|'POST' - * @var string */ - private $method; - /** @var string|null */ - private $field; + private string $method; + private ?string $field; /** * @phpstan-var 'button'|null - * @var string */ - private $HTMLtag; + private ?string $HTMLtag; /** * Create a FreshRSS_Share object. -- cgit v1.2.3