diff options
author | wn_ <[email protected]> | 2022-08-12 14:13:26 +0000 |
---|---|---|
committer | wn_ <[email protected]> | 2022-08-12 14:13:26 +0000 |
commit | 93fd85df6f73732d3a6ed280d26224e1877c954f (patch) | |
tree | 2b2a4fe2adb98d9e2a975b31069cca7bf66c4a04 /classes/pref | |
parent | ed2cbeffcc456a86726b52d37c977a35b895968c (diff) |
Switch to direct type declarations of class properties.
Diffstat (limited to 'classes/pref')
-rw-r--r-- | classes/pref/prefs.php | 10 |
1 files changed, 4 insertions, 6 deletions
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<Prefs::*, array<int, string>> */ - private $pref_help = []; + private array $pref_help = []; /** @var array<string, array<int, string>> pref items are Prefs::*|Pref_Prefs::BLOCK_SEPARATOR (PHPStan was complaining) */ - private $pref_item_map = []; + private array $pref_item_map = []; /** @var array<string, string> */ - private $pref_help_bottom = []; + private array $pref_help_bottom = []; /** @var array<int, string> */ - 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"); |