From 7d2128f364c0e81a15653db2508d3e09b262eca1 Mon Sep 17 00:00:00 2001 From: Fbenas Date: Sat, 2 Sep 2017 20:30:30 +0100 Subject: Refactor site:create command to allow creation of extra tasks easier --- src/Filesystem/CreateDirectory.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/Filesystem/CreateDirectory.php') 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,20 +2,15 @@ namespace App\Filesystem; +use App\Task\TaskInterface; + /** * Class to create a new directory * * @author Phil Burton */ -class CreateDirectory +class CreateDirectory implements TaskInterface { - /** - * Thing we're creating - * - * @author Phil Burton - */ - protected $thing = "directory"; - /** * Directory to create * @@ -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)) { -- cgit v1.2.3