| Conditions | 4 |
| Paths | 4 |
| Total Lines | 29 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | protected function infos() |
||
| 20 | { |
||
| 21 | $path = $this['value']; |
||
| 22 | $details = $this->details($path); |
||
| 23 | $preview = $this->preview($path); |
||
| 24 | |||
| 25 | $rc = ''; |
||
| 26 | |||
| 27 | if ($preview) |
||
| 28 | { |
||
| 29 | $rc .= '<div class="preview">'; |
||
| 30 | $rc .= $preview; |
||
| 31 | $rc .= '</div>'; |
||
| 32 | } |
||
| 33 | |||
| 34 | if ($details) |
||
|
|
|||
| 35 | { |
||
| 36 | $rc .= '<ul class="details">'; |
||
| 37 | |||
| 38 | foreach ($details as $detail) |
||
| 39 | { |
||
| 40 | $rc .= '<li>' . $detail . '</li>'; |
||
| 41 | } |
||
| 42 | |||
| 43 | $rc .= '</ul>'; |
||
| 44 | } |
||
| 45 | |||
| 46 | return $rc; |
||
| 47 | } |
||
| 48 | |||
| 62 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)or! empty(...)instead.