| Conditions | 6 |
| Paths | 8 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 12.7161 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 31 | public function clean($className) |
|
| 19 | { |
||
| 20 | 31 | $file = $this->getFilename($className); |
|
| 21 | 31 | if(file_exists($file)) |
|
| 22 | { |
||
| 23 | unlink($file); |
||
| 24 | $this->cleanBuild($file); |
||
| 25 | } |
||
| 26 | 31 | $partialsDir = $this->getPartialsDir($className); |
|
| 27 | 31 | if(file_exists($partialsDir) && is_dir($partialsDir)) |
|
| 28 | { |
||
| 29 | foreach (new DirectoryIterator($partialsDir) as $info) |
||
| 30 | { |
||
| 31 | $usingFile = $info->getPathname(); |
||
| 32 | if(!$info->isFile()) |
||
| 33 | { |
||
| 34 | continue; |
||
| 35 | } |
||
| 36 | unlink($usingFile); |
||
| 37 | $this->cleanBuild($usingFile); |
||
| 38 | } |
||
| 39 | } |
||
| 40 | 31 | } |
|
| 41 | |||
| 65 | } |