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/Entry.php | 46 +++++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 29 deletions(-) (limited to 'app/Models/Entry.php') diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 31aaf67a0..e3e61fb00 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -7,38 +7,26 @@ class FreshRSS_Entry extends Minz_Model { public const STATE_FAVORITE = 4; public const STATE_NOT_FAVORITE = 8; - /** @var string */ - private $id = '0'; - /** @var string */ - private $guid; - /** @var string */ - private $title; + private string $id = '0'; + private string $guid; + private string $title; /** @var array */ - private $authors; - /** @var string */ - private $content; - /** @var string */ - private $link; - /** @var int */ - private $date; - /** @var int */ - private $lastSeen = 0; - /** @var string In microseconds */ - private $date_added = '0'; - /** @var string */ - private $hash = ''; - /** @var bool|null */ - private $is_read; - /** @var bool|null */ - private $is_favorite; - /** @var int */ - private $feedId; - /** @var FreshRSS_Feed|null */ - private $feed; + private array $authors; + private string $content; + private string $link; + private int $date; + private int $lastSeen = 0; + /** In microseconds */ + private string $date_added = '0'; + private string $hash = ''; + private ?bool $is_read; + private ?bool $is_favorite; + private int $feedId; + private ?FreshRSS_Feed $feed; /** @var array */ - private $tags = []; + private array $tags = []; /** @var array */ - private $attributes = []; + private array $attributes = []; /** * @param int|string $pubdate -- cgit v1.2.3