• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

h4kuna / ares / 20451232047

05 Dec 2025 08:01AM UTC coverage: 84.821% (-4.7%) from 89.497%
20451232047

push

github

h4kuna
Update ARES API 1.3.0

17 of 18 new or added lines in 1 file covered. (94.44%)

21 existing lines in 5 files now uncovered.

380 of 448 relevant lines covered (84.82%)

0.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

72.73
/src/Ares.php
1
<?php declare(strict_types=1);
2

3
namespace h4kuna\Ares;
4

5
use Generator;
6
use h4kuna\Ares\Ares\Core;
7
use h4kuna\Ares\Ares\Core\Data;
8
use h4kuna\Ares\Exception\AdisResponseException;
9
use h4kuna\Ares\Exception\IdentificationNumberNotFoundException;
10
use h4kuna\Ares\Exception\ResultException;
11
use h4kuna\Ares\Exception\ServerResponseException;
12
use h4kuna\Ares\Vies\ViesEntity;
13
use stdClass;
14

15
/**
16
 * properties become readonly
17
 */
18
class Ares
19
{
20
        public function __construct(
1✔
21
                public Core\ContentProvider $aresContentProvider,
22
                public DataBox\ContentProvider $dataBoxContentProvider,
23
                public Adis\ContentProvider $adisContentProvider,
24
                public Vies\ContentProvider $viesContentProvider,
25
        ) {
26
        }
1✔
27

28
        /**
29
         * @deprecated use property
30
         */
31
        public function getAdis(): Adis\ContentProvider
32
        {
33
                return $this->adisContentProvider;
×
34
        }
35

36
        public function getAresClient(): Ares\Client
37
        {
38
                return $this->aresContentProvider->getClient();
×
39
        }
40

41
        /**
42
         * @template KeyName
43
         * @param array<KeyName, string|int> $identificationNumbers
44
         * @return Generator<(int&KeyName)|(KeyName&string), Data>
45
         *
46
         * @throws ResultException
47
         * @throws ServerResponseException
48
         */
49
        public function loadBasicMulti(array $identificationNumbers): Generator
1✔
50
        {
51
                return $this->aresContentProvider->loadByIdentificationNumbers($identificationNumbers);
1✔
52
        }
53

54
        /**
55
         * @throws AdisResponseException
56
         * @throws IdentificationNumberNotFoundException
57
         * @throws ServerResponseException
58
         */
59
        public function loadBasic(string $in): Data
1✔
60
        {
61
                return $this->aresContentProvider->load($in);
1✔
62
        }
63

64
        /**
65
         * @return array<stdClass>
66
         * @throws ResultException
67
         * @throws ServerResponseException
68
         */
69
        public function loadDataBox(string $in): array
1✔
70
        {
71
                return $this->dataBoxContentProvider->load($in);
1✔
72
        }
73

74
        /**
75
         * @return object{countryCode: string, vatNumber: string, requestDate: string, valid: bool, requestIdentifier: string, name: string, address: string, traderName: string, traderStreet: string, traderPostalCode: string, traderCity: string, traderCompanyType: string, traderNameMatch: string, traderStreetMatch: string, traderPostalCodeMatch: string, traderCityMatch: string, traderCompanyTypeMatch: string}
76
         *
77
         * @throws ServerResponseException
78
         */
79
        public function checkVatVies(string|ViesEntity $viesEntityOrTin): object
80
        {
UNCOV
81
                return $this->viesContentProvider->checkVat($viesEntityOrTin);
×
82
        }
83

84
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc