| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 59 | public function setPath(string $path) |
||
| 60 | { |
||
| 61 | if ($this->path === null) { |
||
| 62 | $this->path = $path; |
||
| 63 | } else { |
||
| 64 | if ($this->path != $path) { |
||
| 65 | if (file_exists($this->getTemplateDir().$path)) { |
||
| 66 | throw new \Exception('file ever exist'); |
||
| 67 | } else { |
||
| 68 | $this->unlink = $this->getTemplateDir().$this->path; |
||
| 69 | $this->path = $path; |
||
| 70 | } |
||
| 71 | } |
||
| 72 | } |
||
| 73 | |||
| 74 | return $this; |
||
| 75 | } |
||
| 101 |