| Conditions | 4 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function convert(): int | string |
||
| 18 | { |
||
| 19 | return match ($this->inputFormat) { |
||
| 20 | IPAddressFormat::BINARY => $this->withDotNotation |
||
| 21 | ? $this->fromBinaryToDottedHex($this->address) |
||
| 22 | : $this->fromBinaryToHex($this->address), |
||
| 23 | IPAddressFormat::DECIMAL => $this->withDotNotation |
||
| 24 | ? $this->fromDecimalToDottedHex($this->address) |
||
| 25 | : $this->fromDecimalToHex($this->address), |
||
| 26 | IPAddressFormat::LONG => $this->withDotNotation ? |
||
| 27 | $this->fromLongToDottedHex($this->address) : |
||
|
|
|||
| 28 | $this->fromLongToHex($this->address), |
||
| 29 | default => '', |
||
| 30 | }; |
||
| 33 |