| 1 | <?php |
||
| 25 | class NameVersion implements Component |
||
| 26 | { |
||
| 27 | private $config; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Creates the renderer. |
||
| 31 | * |
||
| 32 | * @param ApplicationConfig $config The application configuration. |
||
| 33 | */ |
||
| 34 | 23 | public function __construct(ApplicationConfig $config) |
|
| 38 | |||
| 39 | /** |
||
| 40 | * Renders the name and version. |
||
| 41 | * |
||
| 42 | * @param IO $io The I/O. |
||
| 43 | * @param int $indentation The number of spaces to indent. |
||
| 44 | */ |
||
| 45 | 23 | public function render(IO $io, $indentation = 0) |
|
| 57 | } |
||
| 58 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: