| 1 | <?php |
||
| 20 | class Placeholder implements RendererInterface |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * Render source text |
||
| 24 | * |
||
| 25 | * @param array $source |
||
| 26 | * @param array $arguments |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | public function render(array $source, array $arguments) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Get key to placeholder |
||
| 44 | * |
||
| 45 | * @param string|int $key |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | private function keyToPlaceholder($key) |
||
| 52 | } |
||
| 53 |
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.