| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 70 | 7 | protected function createDir($fileName) |
|
| 71 | { |
||
| 72 | 7 | $targetdir = dirname($fileName); |
|
| 73 | 7 | if (!file_exists($targetdir)) { |
|
| 74 | 6 | if (!mkdir($targetdir, 0766, true)) { |
|
| 75 | 1 | throw new Downloader\TransportException( |
|
| 76 | 1 | "The file could not be written to $this->fileName." |
|
| 77 | ); |
||
| 78 | } |
||
| 79 | 5 | $this->createdDir = $targetdir; |
|
| 80 | } |
||
| 81 | 6 | } |
|
| 82 | } |
||
| 83 |