Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | /** |
| 3 | * Jingga |
| 4 | * |
| 5 | * PHP Version 8.1 |
| 6 | * |
| 7 | * @package phpOMS\Api\EUVAT |
| 8 | * @copyright Dennis Eichhorn |
| 9 | * @license OMS License 2.0 |
| 10 | * @version 1.0.0 |
| 11 | * @link https://jingga.app |
| 12 | */ |
| 13 | declare(strict_types=1); |
| 14 | |
| 15 | namespace phpOMS\Api\EUVAT; |
| 16 | |
| 17 | /** |
| 18 | * EU VAT validation interface |
| 19 | * |
| 20 | * @package phpOMS\Api\EUVAT |
| 21 | * @license OMS License 2.0 |
| 22 | * @link https://jingga.app |
| 23 | * @since 1.0.0 |
| 24 | */ |
| 25 | interface EUVATInterface |
| 26 | { |
| 27 | /** |
| 28 | * Validate VAT |
| 29 | * |
| 30 | * @param string $otherVAT EU VAT to validate (VAT in own country not possible) |
| 31 | * @param string $ownVAT Valid own EU VAT |
| 32 | * |
| 33 | * @return array |
| 34 | * |
| 35 | * @since 1.0.0 |
| 36 | */ |
| 37 | public static function validate(string $otherVAT, string $ownVAT = '') : array; |
| 38 | |
| 39 | /** |
| 40 | * Qualified VAT validation |
| 41 | * |
| 42 | * The qualified validation is very strict, even one wrong character will result in a failure (e.g. street abbreviations) |
| 43 | * |
| 44 | * @param string $otherVAT EU VAT to validate (VAT in own country not possible) |
| 45 | * @param string $ownVAT Valid own EU VAT |
| 46 | * @param string $otherName Company name to validate |
| 47 | * @param string $otherCity City to validate |
| 48 | * @param string $otherPostal Zip to validate |
| 49 | * @param string $otherStreet Street to validate |
| 50 | * |
| 51 | * @return array |
| 52 | * |
| 53 | * @since 1.0.0 |
| 54 | */ |
| 55 | public static function validateQualified(string $otherVAT, string $ownVAT, string $otherName, string $otherCity, string $otherPostal, string $otherStreet) : array; |
| 56 | } |