Conditions | 3 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | 13 | public function cacheStamp($fileName) |
|
|
|||
16 | { |
||
17 | // In developent, use non minified version |
||
18 | 13 | if (APPLICATION_ENV == 'development') { |
|
19 | $fileName = str_replace('/js/min/', '/js/', $fileName); |
||
20 | } |
||
21 | |||
22 | 13 | $fullPath = APPLICATION_PATH . '/../public/' . $fileName; |
|
23 | 13 | if (is_file($fullPath)) { |
|
24 | 13 | $fileName = $this->view->serverUrl() . $this->view->baseUrl($fileName) . '?' . filemtime($fullPath); |
|
2 ignored issues
–
show
|
|||
25 | } |
||
26 | |||
27 | 13 | return $fileName; |
|
28 | } |
||
29 | } |
||
30 |