diff --git a/src/Drivers/Abstract/AbstractImage.php b/src/Drivers/Abstract/AbstractImage.php index 75994f5b..f615f238 100644 --- a/src/Drivers/Abstract/AbstractImage.php +++ b/src/Drivers/Abstract/AbstractImage.php @@ -17,16 +17,23 @@ use Intervention\Image\Interfaces\ModifierInterface; use Intervention\Image\Interfaces\SizeInterface; use Intervention\Image\Traits\CanHandleInput; use Intervention\Image\Traits\CanResolveDriverClass; -use Intervention\Image\Traits\CanRunCallback; abstract class AbstractImage implements ImageInterface { use CanResolveDriverClass; use CanHandleInput; - use CanRunCallback; protected Collection $exif; + protected function runCallback(?callable $callback, object $object): object + { + if (is_callable($callback)) { + $callback($object); + } + + return $object; + } + public function mapFrames(callable $callback): ImageInterface { foreach ($this as $frame) { diff --git a/src/Traits/CanRunCallback.php b/src/Traits/CanRunCallback.php deleted file mode 100644 index b2da4b0d..00000000 --- a/src/Traits/CanRunCallback.php +++ /dev/null @@ -1,15 +0,0 @@ -