aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Share.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2023-10-30 20:47:27 +0100
committerGravatar GitHub <noreply@github.com> 2023-10-30 20:47:27 +0100
commit06d00995049db9c7b915f67cfd4a5708aace458f (patch)
tree0176ca9761b34d72ffd597bd96da3c3ae4912d86 /app/Models/Share.php
parent4a02352ccc1b313ce967415c6ac10a32aba1893a (diff)
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
Diffstat (limited to 'app/Models/Share.php')
-rw-r--r--app/Models/Share.php46
1 files changed, 16 insertions, 30 deletions
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<string,FreshRSS_Share>
*/
- 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<callable>|array<string,array<callable>> */
- 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.