diff --git a/composer.json b/composer.json index 7a88df7..fd0744f 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,12 @@ { "name": "ether/thumbro", "description": "Craft CMS image transformations powered by Thumbor", - "version": "1.0.8", + "version": "2.0.0", "type": "craft-plugin", "license": "proprietary", "minimum-stability": "dev", "require": { - "craftcms/cms": "^3.2.1" + "craftcms/cms": "^4" }, "autoload": { "psr-4": { diff --git a/src/Service.php b/src/Service.php index 033add3..323b730 100644 --- a/src/Service.php +++ b/src/Service.php @@ -31,7 +31,7 @@ class Service extends Component // Methods // ========================================================================= - public function init () + public function init (): void { parent::init(); diff --git a/src/Thumbro.php b/src/Thumbro.php index f9d7d7f..4166152 100644 --- a/src/Thumbro.php +++ b/src/Thumbro.php @@ -58,7 +58,7 @@ public function init () // Settings // ========================================================================= - protected function createSettingsModel () + protected function createSettingsModel (): ?Model { return new Settings(); } @@ -66,7 +66,7 @@ protected function createSettingsModel () /** * @return bool|Model|Settings */ - public function getSettings () + public function getSettings (): ?Model { return parent::getSettings(); } diff --git a/src/ThumbroDirective.php b/src/ThumbroDirective.php index f40251e..c4870a0 100644 --- a/src/ThumbroDirective.php +++ b/src/ThumbroDirective.php @@ -70,7 +70,7 @@ public static function name (): string */ public static function apply ( $source, $value, array $transform, ResolveInfo $resolveInfo - ) { + ): mixed { $onAssetElement = $source === null && $value instanceof Asset; $onAssetElementList = $source === null && is_array($value) && !empty($value); $onApplicableAssetField = $source instanceof Asset && $resolveInfo->fieldName === 'url';