Conditions | 4 |
Paths | 3 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
55 | public function render($context) |
||
56 | { |
||
57 | if ($this->place || $this->place == self::RESET_CONTEXT) { |
||
|
|||
58 | return sprintf('<img src="%s" alt="%s" />', $this->path, $this->alt); |
||
59 | } elseif ($this->place == self::PRE_CONTEXT) { |
||
60 | return sprintf('<img src="%s" alt="%s" />', $this->path, $this->alt) . $context; |
||
61 | } else { |
||
62 | return $context . sprintf('<img src="%s" alt="%s" />', $this->path, $this->alt); |
||
63 | } |
||
64 | } |
||
65 | } |
||
66 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: