Skip to content

Commit

Permalink
Upgrade for Craft 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Tam committed Aug 12, 2024
1 parent 888671a commit 1b0a6e7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Service extends Component
// Methods
// =========================================================================

public function init ()
public function init (): void
{
parent::init();

Expand Down
4 changes: 2 additions & 2 deletions src/Thumbro.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ public function init ()
// Settings
// =========================================================================

protected function createSettingsModel ()
protected function createSettingsModel (): ?Model
{
return new Settings();
}

/**
* @return bool|Model|Settings
*/
public function getSettings ()
public function getSettings (): ?Model
{
return parent::getSettings();
}
Expand Down
2 changes: 1 addition & 1 deletion src/ThumbroDirective.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 1b0a6e7

Please sign in to comment.