Total Complexity | 8 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | trait ThumbnailTrait |
||
16 | { |
||
17 | /** |
||
18 | * @var array|null|ActiveRecord|Mediafile |
||
19 | */ |
||
20 | protected $thumbnailModel; |
||
21 | |||
22 | /** |
||
23 | * Get album thumb image. |
||
24 | * |
||
25 | * @param array $options |
||
26 | * |
||
27 | * @return mixed |
||
28 | */ |
||
29 | public function getDefaultThumbImage(array $options = []) |
||
30 | { |
||
31 | $url = $this->getDefaultThumbUrl(); |
||
32 | |||
33 | if (empty($url)) { |
||
34 | return null; |
||
35 | } |
||
36 | |||
37 | if (empty($options['alt'])) { |
||
38 | $options['alt'] = $this->thumbnailModel->alt; |
||
39 | } |
||
40 | |||
41 | return Html::img($url, $options); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * Get default url to thumbnail file. |
||
46 | * |
||
47 | * @return null|string |
||
48 | */ |
||
49 | public function getDefaultThumbUrl() |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * Get model's thumbnail. |
||
60 | * |
||
61 | * @return array|null|\yii\db\ActiveRecord|Mediafile |
||
62 | */ |
||
63 | public function getThumbnailModel() |
||
74 | } |
||
75 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.