Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
61 | public static function getNewFileName($view, $path, $prepend = ' '){ |
||
62 | $fileNum = 1; |
||
63 | |||
64 | while ($view->file_exists($path)){ |
||
65 | $fileNum += 1; |
||
66 | $path = preg_replace('/(\.|' . $prepend . '\(\d+\)\.)([^.]*)$/', $prepend . '(' . $fileNum . ').$2', $path); |
||
67 | }; |
||
68 | |||
69 | return $path; |
||
70 | } |
||
71 | } |
||
72 |