Conditions | 3 |
Paths | 3 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
57 | public function vasri( |
||
58 | string $file, |
||
59 | bool $enableVersioning = true, |
||
60 | bool $enableSRI = true, |
||
61 | string $keyword = 'anonymous' |
||
62 | ): string { |
||
63 | $output = ''; |
||
64 | |||
65 | if (self::isFile($file) === true) { |
||
66 | $output .= $this->addAttribute($file, $enableVersioning); |
||
67 | if ($enableSRI === true) { |
||
68 | $output .= $this->addSRI($file, $keyword); |
||
69 | } |
||
70 | |||
71 | return $output; |
||
72 | |||
73 | } else { |
||
74 | throw new Exception('Incorrect file path or file does not exist for local asset'); |
||
75 | } |
||
76 | } |
||
77 | |||
123 |