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

h4kuna / ares / 22608493803

22 Feb 2026 12:32PM UTC coverage: 84.701% (-4.8%) from 89.497%
22608493803

push

github

web-flow
Merge pull request #51 from h4kuna/php-coding-standard

Add coding standards

38 of 47 new or added lines in 16 files covered. (80.85%)

19 existing lines in 5 files now uncovered.

382 of 451 relevant lines covered (84.7%)

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\Adis\ContentProvider as AdisContentProvider;
7
use h4kuna\Ares\Ares\Client as AresClient;
8
use h4kuna\Ares\Ares\Core\ContentProvider as AresCoreContentProvider;
9
use h4kuna\Ares\Ares\Core\Data;
10
use h4kuna\Ares\DataBox\ContentProvider as DataBoxContentProvider;
11
use h4kuna\Ares\Exception\AdisResponseException;
12
use h4kuna\Ares\Exception\IdentificationNumberNotFoundException;
13
use h4kuna\Ares\Exception\ResultException;
14
use h4kuna\Ares\Exception\ServerResponseException;
15
use h4kuna\Ares\Vies\ContentProvider as ViesContentProvider;
16
use h4kuna\Ares\Vies\ViesEntity;
17
use stdClass;
18

19
/**
20
 * properties become readonly
21
 */
22
class Ares
23
{
24

25
        public function __construct(
1✔
26
                public AresCoreContentProvider $aresContentProvider,
27
                public DataBoxContentProvider $dataBoxContentProvider,
28
                public AdisContentProvider $adisContentProvider,
29
                public ViesContentProvider $viesContentProvider,
30
        )
31
        {
32
        }
1✔
33

34
        /**
35
         * @deprecated use property
36
         */
37
        public function getAdis(): AdisContentProvider
38
        {
39
                return $this->adisContentProvider;
×
40
        }
41

42
        public function getAresClient(): AresClient
43
        {
44
                return $this->aresContentProvider->getClient();
×
45
        }
46

47
        /**
48
         * @param array<KeyName, string|int> $identificationNumbers
49
         * @return Generator<(int&KeyName)|(KeyName&string), Data>
50
         *
51
         * @template KeyName
52
         *
53
         * @throws ResultException
54
         * @throws ServerResponseException
55
         */
56
        public function loadBasicMulti(array $identificationNumbers): Generator
1✔
57
        {
58
                return $this->aresContentProvider->loadByIdentificationNumbers($identificationNumbers);
1✔
59
        }
60

61
        /**
62
         * @throws AdisResponseException
63
         * @throws IdentificationNumberNotFoundException
64
         * @throws ServerResponseException
65
         */
66
        public function loadBasic(string $in): Data
1✔
67
        {
68
                return $this->aresContentProvider->load($in);
1✔
69
        }
70

71
        /**
72
         * @return array<stdClass>
73
         *
74
         * @throws ResultException
75
         * @throws ServerResponseException
76
         */
77
        public function loadDataBox(string $in): array
1✔
78
        {
79
                return $this->dataBoxContentProvider->load($in);
1✔
80
        }
81

82
        /**
83
         * @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}
84
         *
85
         * @throws ServerResponseException
86
         */
87
        public function checkVatVies(string|ViesEntity $viesEntityOrTin): object
88
        {
UNCOV
89
                return $this->viesContentProvider->checkVat($viesEntityOrTin);
×
90
        }
91

92
}
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