diff options
| author | 2023-12-22 11:03:47 +0100 | |
|---|---|---|
| committer | 2023-12-22 11:03:47 +0100 | |
| commit | 6d2e53178b6dc83845f4eaabde458c2c5b2d24fb (patch) | |
| tree | b094eddc299f3a50b989d4dfb8487f65c37dc848 /lib/Minz | |
| parent | c7a3281a73839590bfa9d8a9e73c41fc35fc2847 (diff) | |
Typed Minz_Extension (#5957)
Replaces https://github.com/FreshRSS/FreshRSS/pull/5837
The signature of methods supposed to be overriden by existing thid-party extensions cannot be modified
Diffstat (limited to 'lib/Minz')
| -rw-r--r-- | lib/Minz/Extension.php | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/lib/Minz/Extension.php b/lib/Minz/Extension.php index 5386a64e7..057bdd19e 100644 --- a/lib/Minz/Extension.php +++ b/lib/Minz/Extension.php @@ -5,24 +5,18 @@ declare(strict_types=1); * The extension base class. */ abstract class Minz_Extension { - /** @var string */ - private $name; - /** @var string */ - private $entrypoint; - /** @var string */ - private $path; - /** @var string */ - private $author; - /** @var string */ - private $description; - /** @var string */ - private $version; + private string $name; + private string $entrypoint; + private string $path; + private string $author; + private string $description; + private string $version; /** @var 'system'|'user' */ - private $type; + private string $type; /** @var array<string,mixed>|null */ - private $user_configuration; + private ?array $user_configuration; /** @var array<string,mixed>|null */ - private $system_configuration; + private ?array $system_configuration; /** @var array{0:'system',1:'user'} */ public static array $authorized_types = [ @@ -30,8 +24,7 @@ abstract class Minz_Extension { 'user', ]; - /** @var bool */ - private $is_enabled; + private bool $is_enabled; /** * The constructor to assign specific information to the extension. |
