diff options
Diffstat (limited to 'src/Filesystem/CreateFile.php')
-rw-r--r-- | src/Filesystem/CreateFile.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/Filesystem/CreateFile.php b/src/Filesystem/CreateFile.php index 93c66a6..ce9537f 100644 --- a/src/Filesystem/CreateFile.php +++ b/src/Filesystem/CreateFile.php @@ -2,22 +2,27 @@ namespace App\Filesystem; +use App\Task\TaskInterface; + /** * Class to create a new file * * @author Phil Burton <phil@d3r.com> */ -class CreateFile +class CreateFile implements TaskInterface { /** - * Thing we're creating + * Name of file to create * - * @author Phil Burton <phil@d3r.com> + * @var string */ - protected $thing = "file"; - protected $filename; + /** + * File contents to write + * + * @var string + */ protected $contents; /** @@ -35,7 +40,7 @@ class CreateFile } if (!is_writable(dirname($filename))) { - throw new \Exception('Cannot create ' . $this->thing . ' at: ' . $filename); + throw new \Exception('Cannot create file at: ' . $filename); } if (file_exists($filename)) { |