| 1 | <?php |
||
| 20 | class AppAsset extends AssetBundle |
||
| 21 | { |
||
| 22 | public $sourcePath = '@app/assets/web'; |
||
| 23 | |||
| 24 | public $js = [ |
||
| 25 | 'js/app.js', |
||
| 26 | ]; |
||
| 27 | |||
| 28 | public $css = [ |
||
| 29 | // Note: less files require a compiler (available by default on Phundament Docker images) |
||
| 30 | // use .css alternatively |
||
| 31 | #'less/app.less', |
||
| 32 | ]; |
||
| 33 | |||
| 34 | public $depends = [ |
||
| 35 | 'yii\web\YiiAsset', |
||
| 36 | 'yii\bootstrap\BootstrapPluginAsset', |
||
| 37 | // if we recompile the less files from 'yii\bootstrap\BootstrapAsset' and include the css in app.css |
||
| 38 | // we need set bundle to `false` in application config and remove the following line |
||
| 39 | 'yii\bootstrap\BootstrapAsset', |
||
| 40 | ]; |
||
| 41 | |||
| 42 | public function init() |
||
| 60 | } |
||
| 61 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.