Skip to content

Commit

Permalink
Remove custom dependency for asset-admin
Browse files Browse the repository at this point in the history
Also fix `Image::Quality` to match signature on parent
  • Loading branch information
oilee80 committed Feb 12, 2019
1 parent 77fd9f0 commit 2d2256a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 1 addition & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@
"homepage": "https://www.example.com"
}
],
"repositories": [{
"type": "vcs",
"url": "git@github.com:oilee80/silverstripe-asset-admin.git"
}],
"require": {
"cloudinary/cloudinary_php": "dev-master",
"php": ">=7.0.0",
"silverstripe/asset-admin": "1.1.0-rc3"
"silverstripe/asset-admin": "^1.1"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 6 additions & 1 deletion src/Model/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ public function Crop(string $crop = 'fill')
* @param int $quality
* @return CachedImage
*/
public function Quality(string $quality = 'auto')
public function Quality($quality)
{
return $quality ? $this->setQuality($quality) : $this->setQuality();
}

public function setQuality(string $quality= 'auto')
{
return $this->Transform([ 'quality' => $quality ]);
}
Expand Down

0 comments on commit 2d2256a

Please sign in to comment.