| 1 | <?php |
||
| 9 | class IdentifierRenderer implements Renderer { |
||
| 10 | |||
| 11 | /** @var LinkPrinter */ |
||
| 12 | private $links; |
||
| 13 | |||
| 14 | public function __construct(LinkPrinter $links) { |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param mixed $value |
||
| 20 | * @return bool |
||
| 21 | */ |
||
| 22 | public function handles($value) { |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param Identifier $value |
||
| 28 | * @return mixed |
||
| 29 | */ |
||
| 30 | public function render($value) { |
||
| 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.