diff --git a/composer.json b/composer.json index 15af03f..c7b864f 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,8 @@ } ], "require": { - "craftcms/cms": "^3.0" + "php": "^8.0.2", + "craftcms/cms": "^4.0.0-alpha" }, "autoload": { "psr-4": { diff --git a/src/Plugin.php b/src/Plugin.php index 7e8cf2b..9653513 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -16,10 +16,7 @@ class Plugin extends CraftPlugin { - /** - * @var string - */ - public $schemaVersion = '1.0.0'; + public string $schemaVersion = '1.0.0'; /** * Static property that is an instance of this plugin class so that it can be accessed via @@ -27,7 +24,7 @@ class Plugin extends CraftPlugin * * @var Plugin */ - public static $plugin; + public static Plugin $plugin; /** * @inheritdoc @@ -85,7 +82,7 @@ function (ModelEvent $event) { /** * @inheritdoc */ - protected function createSettingsModel() + protected function createSettingsModel(): Settings { return new Settings(); } diff --git a/src/jobs/RequirePasswordReset.php b/src/jobs/RequirePasswordReset.php index 2c205da..0e75ae7 100644 --- a/src/jobs/RequirePasswordReset.php +++ b/src/jobs/RequirePasswordReset.php @@ -3,7 +3,6 @@ namespace born05\enforcepassword\jobs; use born05\enforcepassword\Plugin as EnforcePassword; -use born05\enforcepassword\records\Password as PasswordRecord; use Craft; use craft\elements\User; @@ -16,7 +15,7 @@ class RequirePasswordReset extends BaseJob /** * @inheritdoc */ - public function execute($queue) + public function execute($queue): void { $settings = EnforcePassword::$plugin->getSettings();