From 93fd85df6f73732d3a6ed280d26224e1877c954f Mon Sep 17 00:00:00 2001 From: wn_ Date: Fri, 12 Aug 2022 14:13:26 +0000 Subject: Switch to direct type declarations of class properties. --- classes/pref/prefs.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'classes/pref') diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 7acd06aa4..3e651297e 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -2,18 +2,17 @@ use chillerlan\QRCode; class Pref_Prefs extends Handler_Protected { - // TODO: class properties can be switched to PHP typing if/when the minimum PHP_VERSION is raised to 7.4.0+ /** @var array> */ - private $pref_help = []; + private array $pref_help = []; /** @var array> pref items are Prefs::*|Pref_Prefs::BLOCK_SEPARATOR (PHPStan was complaining) */ - private $pref_item_map = []; + private array $pref_item_map = []; /** @var array */ - private $pref_help_bottom = []; + private array $pref_help_bottom = []; /** @var array */ - private $pref_blacklist = []; + private array $pref_blacklist = []; private const BLOCK_SEPARATOR = 'BLOCK_SEPARATOR'; @@ -26,7 +25,6 @@ class Pref_Prefs extends Handler_Protected { const PI_ERR_PLUGIN_NOT_FOUND = "PI_ERR_PLUGIN_NOT_FOUND"; const PI_ERR_NO_WORKDIR = "PI_ERR_NO_WORKDIR"; - /** @param string $method */ function csrf_ignore(string $method) : bool { $csrf_ignored = array("index", "updateself", "otpqrcode"); -- cgit v1.2.3-54-g00ecf