Commit fa18aca2 authored by Nicolas Widart's avatar Nicolas Widart

Refactoring for explicity

parent 2bbc2231
......@@ -54,7 +54,7 @@ class Imagy
$image = $image->encode(pathinfo($path, PATHINFO_EXTENSION));
$this->finder->put(public_path() . $filename, $image);
$this->writeImage($filename, $image);
return $filename;
}
......@@ -82,4 +82,14 @@ class Imagy
{
return $this->finder->isFile(public_path() . $filename) && !$forceCreate;
}
/**
* Write the given image
* @param string $filename
* @param string $image
*/
private function writeImage($filename, $image)
{
$this->finder->put(public_path() . $filename, $image);
}
}
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