| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 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 | |||
| 75 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: