From 32368a8f94f736263b2e693b30554643002574e2 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 31 Aug 2024 19:11:53 +0100 Subject: [PATCH] people who need Configs should accept Configs, no need to specify BaseConfig --- ext/setup/main.php | 8 ++++---- ext/user/events.php | 2 +- ext/user_config/main.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/setup/main.php b/ext/setup/main.php index 7c3f2807..a7f74160 100644 --- a/ext/setup/main.php +++ b/ext/setup/main.php @@ -49,9 +49,9 @@ class SetupPanel { /** @var SetupBlock[] */ public array $blocks = []; - public BaseConfig $config; + public Config $config; - public function __construct(BaseConfig $config) + public function __construct(Config $config) { $this->config = $config; } @@ -68,9 +68,9 @@ class SetupBlock extends Block { public ?string $header; public ?string $body; - public BaseConfig $config; + public Config $config; - public function __construct(string $title, BaseConfig $config) + public function __construct(string $title, Config $config) { parent::__construct($title, "", "main", 50); $this->config = $config; diff --git a/ext/user/events.php b/ext/user/events.php index 868f3a90..52850fac 100644 --- a/ext/user/events.php +++ b/ext/user/events.php @@ -24,7 +24,7 @@ class UserOperationsBuildingEvent extends PartListBuildingEvent { public function __construct( public User $user, - public BaseConfig $user_config, + public Config $user_config, ) { parent::__construct(); } diff --git a/ext/user_config/main.php b/ext/user_config/main.php index 37c24a9d..1b696884 100644 --- a/ext/user_config/main.php +++ b/ext/user_config/main.php @@ -61,7 +61,7 @@ class UserConfig extends Extension $user_config = self::get_for_user($event->user->id); } - public static function get_for_user(int $id): BaseConfig + public static function get_for_user(int $id): Config { global $database;