Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
59 | 11 | public function getMetadata(): array |
|
60 | { |
||
61 | 11 | $data = parent::getMetadata(); |
|
62 | 11 | if ($this->currencyCode) { |
|
63 | 1 | $data['currencyCode'] = $this->currencyCode; |
|
64 | } |
||
65 | |||
66 | 11 | if ($this->numberStyle) { |
|
67 | 1 | $data['numberStyle'] = $this->numberStyle->getValue(); |
|
68 | } |
||
69 | |||
70 | 11 | return $data; |
|
71 | } |
||
72 | } |
||
73 |
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: