diff options
author | Fbenas <philbeansburton@gmail.com> | 2017-09-02 20:30:30 +0100 |
---|---|---|
committer | Fbenas <philbeansburton@gmail.com> | 2017-09-02 20:30:30 +0100 |
commit | 7d2128f364c0e81a15653db2508d3e09b262eca1 (patch) | |
tree | 654ed84f42059aa4fd85e93c96db2824da7f06cb /src/Filesystem/CreateDirectory.php | |
parent | e237e378a0bfc6e906d7cf682fc7f7fd4af74528 (diff) |
Refactor site:create command to allow creation of extra tasks easier
Diffstat (limited to 'src/Filesystem/CreateDirectory.php')
-rw-r--r-- | src/Filesystem/CreateDirectory.php | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/Filesystem/CreateDirectory.php b/src/Filesystem/CreateDirectory.php index 64c5fba..2621169 100644 --- a/src/Filesystem/CreateDirectory.php +++ b/src/Filesystem/CreateDirectory.php @@ -2,21 +2,16 @@ namespace App\Filesystem; +use App\Task\TaskInterface; + /** * Class to create a new directory * * @author Phil Burton <phil@d3r.com> */ -class CreateDirectory +class CreateDirectory implements TaskInterface { /** - * Thing we're creating - * - * @author Phil Burton <phil@d3r.com> - */ - protected $thing = "directory"; - - /** * Directory to create * * @var string @@ -34,7 +29,7 @@ class CreateDirectory $this->directory = $directory; if (!is_writable(dirname($directory))) { - throw new \Exception('Cannot create ' . $this->thing . ' at: ' . $directory); + throw new \Exception('Cannot create directory at: ' . $directory); } if (file_exists($directory)) { |