| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 65 | public function prefixFile( $filename ) { |
|
| 20 | 65 | if ( !$this->filePrefix ) { |
|
| 21 | 63 | return $filename; |
|
| 22 | } |
||
| 23 | 2 | $pathParts = pathinfo( $filename ); |
|
| 24 | 2 | $dirPrefix = $pathParts['dirname'] === '.' ? '' : $pathParts['dirname'] . DIRECTORY_SEPARATOR; |
|
| 25 | 2 | return $dirPrefix . $this->filePrefix . '.' . $pathParts['basename']; |
|
| 26 | } |
||
| 27 | |||
| 28 | } |