| Conditions | 5 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 0 | ||
| 1 | <?php |
||
| 94 | public function setUseOperatorUnits($useOperatorUnits) |
||
| 95 | { |
||
| 96 | if (is_numeric($useOperatorUnits) || is_bool($useOperatorUnits)) { |
||
| 97 | $this->useOperatorUnits = $useOperatorUnits ? 'true' : 'false'; |
||
| 98 | } else { |
||
| 99 | if (!in_array($useOperatorUnits, ['true', 'false'])) { |
||
| 100 | throw new InvalidArgumentException("Invalid value `\$seOperatorUnits`, valid is boolean and `true` or `false`."); |
||
| 101 | } |
||
| 102 | $this->useOperatorUnits = $useOperatorUnits; |
||
| 103 | } |
||
| 104 | } |
||
| 105 | |||
| 114 |