Commit 636d840d authored by Nicolas Widart's avatar Nicolas Widart

Add a required amount option on blor

parent 7be577ea
<?php namespace Modules\Media\Image\Intervention\Manipulations;
use InvalidArgumentException;
use Modules\Media\Image\ImageHandlerInterface;
class Blur implements ImageHandlerInterface
......@@ -12,6 +13,10 @@ class Blur implements ImageHandlerInterface
*/
public function handle($image, $options)
{
if (!isset($options['amount'])) {
throw new InvalidArgumentException('An amount option is required');
}
return $image->blur($options['amount']);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment