Conditions | 4 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
45 | 23 | public function render(IO $io, $indentation = 0) |
|
46 | { |
||
47 | 23 | if ($this->config->getDisplayName() && $this->config->getVersion()) { |
|
|
|||
48 | 11 | $paragraph = new Paragraph("{$this->config->getDisplayName()} version <c1>{$this->config->getVersion()}</c1>"); |
|
49 | 12 | } elseif ($this->config->getDisplayName()) { |
|
50 | 3 | $paragraph = new Paragraph("{$this->config->getDisplayName()}"); |
|
51 | } else { |
||
52 | 9 | $paragraph = new Paragraph('Console Tool'); |
|
53 | } |
||
54 | |||
55 | 23 | $paragraph->render($io, $indentation); |
|
56 | 23 | } |
|
57 | } |
||
58 |
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: