From 655c4f38241ab58a3404acb15a751f07dc1bca6a Mon Sep 17 00:00:00 2001 From: Fbenas Date: Tue, 22 Aug 2017 00:45:29 +0100 Subject: Complete refactor --- src/Filesystem/Create.php | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 src/Filesystem/Create.php (limited to 'src/Filesystem/Create.php') diff --git a/src/Filesystem/Create.php b/src/Filesystem/Create.php deleted file mode 100644 index 45b09fd..0000000 --- a/src/Filesystem/Create.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -abstract class Create -{ - /** - * Filename to create - * - * @var string - * @author Phil Burton - */ - protected $filename; - - /** - * Thing we're creating, used for messages - * - * @var string - * @author Phil Burton - */ - protected $thing; - - /** - * Set filename on object and check we can wirte to the Directory - * - * @param string $filename - * @author Phil Burton - */ - public function __construct(string $filename) - { - $this->filename = $filename; - - if (!is_writable(dirname($filename))) { - throw new \Exception('Cannot create ' . $this->thing . ' at: ' . $filename); - } - } - - abstract public function excecute(); -} -- cgit v1.2.3