| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function render($value) { |
||
| 31 | $caption = (new \ReflectionClass($value->getTarget()))->getShortName(); |
||
| 32 | $out = $value->getId(); |
||
| 33 | |||
| 34 | $dropDown = $this->links->createDropDown($value, $caption); |
||
| 35 | if ($dropDown) { |
||
|
|
|||
| 36 | $out .= new Element('span', ['class' => 'pull-right'], $dropDown); |
||
| 37 | } |
||
| 38 | |||
| 39 | return $out; |
||
| 40 | } |
||
| 41 | } |
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.