These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * AssetBundle.php |
||
4 | * @author Revin Roman |
||
5 | * @link https://rmrevin.ru |
||
6 | */ |
||
7 | |||
8 | namespace rmrevin\yii\fontawesome; |
||
9 | |||
10 | /** |
||
11 | * Class AssetBundle |
||
12 | * @package rmrevin\yii\fontawesome |
||
13 | */ |
||
14 | class AssetBundle extends \yii\web\AssetBundle |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * @inherit |
||
19 | */ |
||
20 | public $sourcePath = '@vendor/fortawesome/font-awesome'; |
||
21 | |||
22 | /** |
||
23 | * @inherit |
||
24 | */ |
||
25 | public $css = [ |
||
26 | 'css/font-awesome.min.css', |
||
27 | ]; |
||
28 | |||
29 | /** |
||
30 | * Initializes the bundle. |
||
31 | * Set publish options to copy only necessary files (in this case css and font folders) |
||
32 | * @codeCoverageIgnore |
||
33 | */ |
||
34 | public function init() |
||
35 | { |
||
36 | parent::init(); |
||
37 | |||
38 | $this->publishOptions['beforeCopy'] = function ($from, $to) { |
||
0 ignored issues
–
show
|
|||
39 | return preg_match('%(/|\\\\)(fonts|css)%', $from); |
||
40 | }; |
||
41 | } |
||
42 | } |
||
43 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.