| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 10 | 
| Code Lines | 6 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 7 | 
| CRAP Score | 3 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 34 | 10 | public function findFreeName(array $path, string $name, string $suffix): string | |
| 35 |     { | ||
| 36 | 10 |         if (!$this->targetExists($path, $name . $suffix)) { | |
| 37 | 4 | return $name . $suffix; | |
| 38 | } | ||
| 39 | 6 | $i = 0; | |
| 40 | 6 |         while ($this->targetExists($path, $name . $this->getNameSeparator() . strval($i) . $suffix)) { | |
| 41 | 2 | $i++; | |
| 42 | } | ||
| 43 | 6 | return $name . $this->getNameSeparator() . strval($i) . $suffix; | |
| 44 | } | ||
| 62 |