Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
47 | public function check(string $vatNumber) : bool { |
||
48 | $memberStateCode = substr($vatNumber, 0, 2); |
||
49 | $number = substr($vatNumber, 2); |
||
50 | |||
51 | $params = ['countryCode' => $memberStateCode, 'vatNumber' => $number]; |
||
52 | |||
53 | $result = $this->query('checkVat', $params); |
||
54 | |||
55 | return $result->valid ?? false; |
||
56 | } |
||
58 |