diff --git a/composer.json b/composer.json index d6801c0..4f73d25 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ } ], "require": { - "craftcms/cms": "^3.1", + "craftcms/cms": "^4.0.3", "guzzlehttp/guzzle": "^6.3 || ^7.2" }, "autoload": { diff --git a/src/CraftRecaptcha.php b/src/CraftRecaptcha.php index 5cbf2e8..12ec2f9 100644 --- a/src/CraftRecaptcha.php +++ b/src/CraftRecaptcha.php @@ -65,7 +65,7 @@ class CraftRecaptcha extends Plugin * * @var string */ - public $schemaVersion = '1.0.0'; + public string $schemaVersion = '1.0.0'; // Public Methods // ========================================================================= @@ -163,7 +163,7 @@ function (PluginEvent $event) { * * @return \craft\base\Model|null */ - protected function createSettingsModel() + protected function createSettingsModel() : ? \craft\base\Model { return new Settings(); } diff --git a/src/models/Settings.php b/src/models/Settings.php index b5beb69..e0a09c9 100644 --- a/src/models/Settings.php +++ b/src/models/Settings.php @@ -84,7 +84,7 @@ public function getSecretKey(): string return Craft::parseEnv($this->secretKey); } - public function behaviors() + public function behaviors() :array { return [ 'parser' => [ @@ -104,7 +104,7 @@ public function behaviors() * * @return array */ - public function rules() + public function rules() :array { return [ ['siteKey', 'string'],