| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | 3 | public function setNumberStyle(NumberStyle $numberStyle): void |
|
| 51 | { |
||
| 52 | 3 | if ($this->currencyCode) { |
|
|
|
|||
| 53 | 1 | throw new LogicException('You can not set both a \'currencyCode\' and a \'numberStyle\'. Please set only one of the 2.'); |
|
| 54 | } |
||
| 55 | |||
| 56 | 2 | $this->numberStyle = $numberStyle; |
|
| 57 | 2 | } |
|
| 58 | |||
| 73 |
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: