| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function init() |
||
| 34 | { |
||
| 35 | parent::init(); |
||
| 36 | // we recompile the less files from 'yii\bootstrap\BootstrapAsset' and include the css in app.css |
||
| 37 | // therefore we set bundle to false |
||
| 38 | \Yii::$app->getAssetManager()->bundles['yii\bootstrap\BootstrapAsset'] = false; |
||
| 39 | |||
| 40 | // /!\ CSS/LESS development only setting /!\ |
||
| 41 | // Touch the asset folder with the highest mtime of all contained files |
||
| 42 | // This will create a new folder in web/assets for every change and request |
||
| 43 | // made to the app assets. |
||
| 44 | if (getenv('APP_ASSET_FORCE_PUBLISH')) { |
||
| 45 | $files = FileHelper::findFiles(\Yii::getAlias($this->sourcePath)); |
||
|
|
|||
| 46 | $mtimes = []; |
||
| 47 | foreach ($files as $file) { |
||
| 48 | $mtimes[] = filemtime($file); |
||
| 49 | } |
||
| 50 | touch(\Yii::getAlias($this->sourcePath), max($mtimes)); |
||
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.