cleaner handling of cropZoom

Signed-off-by: Andy Miller <rhuk@mac.com>
This commit is contained in:
Andy Miller
2020-06-04 14:31:22 -06:00
parent 3bd4f9499a
commit aaa636f357

View File

@@ -516,6 +516,15 @@ class ImageMedium extends Medium
return $this;
}
/**
* Handle this commonly used variant
*/
public function cropZoom()
{
$this->__call('zoomCrop', func_get_args());
return $this;
}
/**
* Forward the call to the image processing method.
*
@@ -525,10 +534,6 @@ class ImageMedium extends Medium
*/
public function __call($method, $args)
{
if ($method === 'cropZoom') {
$method = 'zoomCrop';
}
if (!\in_array($method, self::$magic_actions, true)) {
return parent::__call($method, $args);
}