Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
63 | 10 | private function getFullTaxNumber(): string |
|
64 | { |
||
65 | 10 | $prefixStartsWithCountry = Str::of($this->getPrefix()) |
|
66 | 10 | ->startsWith($this->country); |
|
67 | |||
68 | 10 | if ($prefixStartsWithCountry) { |
|
69 | 3 | return (string) Str::of($this->tax_number) |
|
70 | 3 | ->substr(2) |
|
71 | 3 | ->start($this->country); |
|
72 | } |
||
73 | |||
74 | 7 | return Str::start($this->tax_number, $this->country); |
|
75 | } |
||
77 |