public function __construct(ImagineInterface $imagine, $filesystem = null) { $this->imagine = $imagine; $this->filesystem = $filesystem ?: new Filesystem(); }