1 | <?php |
||
19 | class SwiperSliderAsset extends AssetBundle |
||
20 | { |
||
21 | public $sourcePath = '@npm/swiper'; |
||
22 | |||
23 | /** |
||
24 | * {@inheritdoc} |
||
25 | */ |
||
26 | 18 | public function init() |
|
32 | |||
33 | /** |
||
34 | * Create cdn url like base path to assets. |
||
35 | * |
||
36 | * @param string $cdn |
||
37 | * |
||
38 | * @return void |
||
39 | */ |
||
40 | 6 | public function fromCdn($cdn) |
|
45 | |||
46 | /** |
||
47 | * Set js or css props to AssetBundle. |
||
48 | * |
||
49 | * @see yii\web\AssetBundle |
||
50 | * |
||
51 | * @param string $ext |
||
52 | * @param array $paths |
||
53 | * |
||
54 | * @return void |
||
55 | */ |
||
56 | 18 | public function setupAssets($ext, $paths) |
|
72 | |||
73 | /** |
||
74 | * Make path for asset. |
||
75 | * |
||
76 | * @param string $ext |
||
77 | * @param array $paths |
||
78 | * @param bool|string $pref |
||
79 | * |
||
80 | * @return array |
||
81 | */ |
||
82 | 21 | public static function makePathAssets($ext, $paths, $pref = false) |
|
91 | |||
92 | /** |
||
93 | * Registers this asset bundle with a view. |
||
94 | * |
||
95 | * @param View $view the view to be registered with |
||
96 | * |
||
97 | * @return static the registered asset bundle instance |
||
98 | */ |
||
99 | 18 | public static function register($view, $cdn = false) |
|
109 | } |
||
110 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: