From 87b06a675d4539f4f0620902805a50dbe50c15ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20Klabbers?= Date: Sat, 11 Feb 2017 21:14:44 +0100 Subject: [PATCH] fixed issues with $extension visibility and typehinting --- framework/core/src/Event/ExtensionWasDisabled.php | 4 ++-- framework/core/src/Event/ExtensionWasEnabled.php | 4 ++-- framework/core/src/Event/ExtensionWasUninstalled.php | 10 ++++++---- framework/core/src/Event/ExtensionWillBeDisabled.php | 2 +- framework/core/src/Event/ExtensionWillBeEnabled.php | 2 +- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/framework/core/src/Event/ExtensionWasDisabled.php b/framework/core/src/Event/ExtensionWasDisabled.php index e9a9b61b7..a38bab60b 100644 --- a/framework/core/src/Event/ExtensionWasDisabled.php +++ b/framework/core/src/Event/ExtensionWasDisabled.php @@ -16,9 +16,9 @@ use Flarum\Extension\Extension; class ExtensionWasDisabled { /** - * @var string + * @var Extension */ - protected $extension; + public $extension; /** * @param Extension $extension diff --git a/framework/core/src/Event/ExtensionWasEnabled.php b/framework/core/src/Event/ExtensionWasEnabled.php index 6715c5d82..d593fad42 100644 --- a/framework/core/src/Event/ExtensionWasEnabled.php +++ b/framework/core/src/Event/ExtensionWasEnabled.php @@ -16,9 +16,9 @@ use Flarum\Extension\Extension; class ExtensionWasEnabled { /** - * @var string + * @var Extension */ - protected $extension; + public $extension; /** * @param Extension $extension diff --git a/framework/core/src/Event/ExtensionWasUninstalled.php b/framework/core/src/Event/ExtensionWasUninstalled.php index 887b9fa0a..4b50c4a64 100644 --- a/framework/core/src/Event/ExtensionWasUninstalled.php +++ b/framework/core/src/Event/ExtensionWasUninstalled.php @@ -11,17 +11,19 @@ namespace Flarum\Event; +use Flarum\Extension\Extension; + class ExtensionWasUninstalled { /** - * @var string + * @var Extension */ - protected $extension; + public $extension; /** - * @param string $extension + * @param Extension $extension */ - public function __construct($extension) + public function __construct(Extension $extension) { $this->extension = $extension; } diff --git a/framework/core/src/Event/ExtensionWillBeDisabled.php b/framework/core/src/Event/ExtensionWillBeDisabled.php index 0823652a2..e1deddba1 100644 --- a/framework/core/src/Event/ExtensionWillBeDisabled.php +++ b/framework/core/src/Event/ExtensionWillBeDisabled.php @@ -16,7 +16,7 @@ use Flarum\Extension\Extension; class ExtensionWillBeDisabled { /** - * @var string + * @var Extension */ public $extension; diff --git a/framework/core/src/Event/ExtensionWillBeEnabled.php b/framework/core/src/Event/ExtensionWillBeEnabled.php index 0a664dc13..6bcaed507 100644 --- a/framework/core/src/Event/ExtensionWillBeEnabled.php +++ b/framework/core/src/Event/ExtensionWillBeEnabled.php @@ -16,7 +16,7 @@ use Flarum\Extension\Extension; class ExtensionWillBeEnabled { /** - * @var string + * @var Extension */ public $extension;