Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
13 | 4 | public function __construct($targetDirectory, StorageFactoryInterface $storageFactory = null) |
|
14 | { |
||
15 | 4 | parent::__construct($storageFactory); |
|
16 | |||
17 | 4 | if (!is_dir($targetDirectory) || !is_writeable($targetDirectory)) { |
|
18 | 1 | throw new \InvalidArgumentException("Targetdirectory $targetDirectory is not writable!"); |
|
19 | } |
||
20 | |||
21 | 3 | $this->targetDirectory = realpath($targetDirectory); |
|
22 | 3 | } |
|
23 | |||
54 |