1 | <?php |
||
16 | class View extends \yii\web\View |
||
17 | { |
||
18 | |||
19 | /** @var bool */ |
||
20 | public $enableMinify = true; |
||
21 | |||
22 | /** @var string filemtime or sha1 */ |
||
23 | public $fileCheckAlgorithm = 'filemtime'; |
||
24 | |||
25 | /** @var bool */ |
||
26 | public $minifyCss = true; |
||
27 | |||
28 | /** @var bool */ |
||
29 | public $minifyJs = true; |
||
30 | |||
31 | /** @var bool */ |
||
32 | public $removeComments = true; |
||
33 | |||
34 | /** @var string path alias to web base (in url) */ |
||
35 | public $web_path = '@web'; |
||
36 | |||
37 | /** @var string path alias to web base (absolute) */ |
||
38 | public $base_path = '@webroot'; |
||
39 | |||
40 | /** @var string path alias to save minify result */ |
||
41 | public $minify_path = '@webroot/minify'; |
||
42 | |||
43 | /** @var array positions of js files to be minified */ |
||
44 | public $js_position = [self::POS_END, self::POS_HEAD]; |
||
45 | |||
46 | /** @var bool|string charset forcibly assign, otherwise will use all of the files found charset */ |
||
47 | public $force_charset = false; |
||
48 | |||
49 | /** @var bool whether to change @import on content */ |
||
50 | public $expand_imports = true; |
||
51 | |||
52 | /** @var int */ |
||
53 | public $css_linebreak_pos = 2048; |
||
54 | |||
55 | /** @var int|bool chmod of minified file. If false chmod not set */ |
||
56 | public $file_mode = 0664; |
||
57 | |||
58 | /** @var array schemes that will be ignored during normalization url */ |
||
59 | public $schemas = ['//', 'http://', 'https://', 'ftp://']; |
||
60 | |||
61 | /** @var bool do I need to compress the result html page. */ |
||
62 | public $compress_output = false; |
||
63 | |||
64 | /** |
||
65 | * @var array options for compressing output result |
||
66 | * * extra - use more compact algorithm |
||
67 | * * no-comments - cut all the html comments |
||
68 | */ |
||
69 | public $compress_options = ['extra' => true]; |
||
70 | |||
71 | /** |
||
72 | * @throws \rmrevin\yii\minify\Exception |
||
73 | */ |
||
74 | 6 | public function init() |
|
107 | |||
108 | /** |
||
109 | * @inheritdoc |
||
110 | */ |
||
111 | 4 | public function endPage($ajaxMode = false) |
|
141 | } |
||
142 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.
For example, imagine you have a variable
$accountId
that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to theid
property of an instance of theAccount
class. This class holds a proper account, so the id value must no longer be false.Either this assignment is in error or a type check should be added for that assignment.