1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace LauLamanApps\eCurring\Resource\Proxy; |
||
6 | |||
7 | use DateTimeImmutable; |
||
8 | use LauLamanApps\eCurring\eCurringClientInterface; |
||
9 | use LauLamanApps\eCurring\Resource\Customer; |
||
10 | use LauLamanApps\eCurring\Resource\Customer\Gender; |
||
11 | use LauLamanApps\eCurring\Resource\Customer\VerificationMethod; |
||
12 | use LauLamanApps\eCurring\Resource\CustomerInterface; |
||
13 | use LauLamanApps\eCurring\Resource\Transaction\PaymentMethod; |
||
14 | |||
15 | /** |
||
16 | * @method int getId() |
||
17 | * @method Gender getGender() |
||
18 | * @method string getFirstName() |
||
19 | * @method string|null getMiddleName() |
||
20 | * @method string getLastName() |
||
21 | * @method string getCompanyName() |
||
22 | * @method string getVatNumber() |
||
23 | * @method PaymentMethod getPaymentType() |
||
24 | * @method VerificationMethod|null getBankVerificationMethod() |
||
25 | * @method string getCardHolder() |
||
26 | * @method string getCardNumber() |
||
27 | * @method string getPostalcode() |
||
28 | * @method string getHouseNumber() |
||
29 | * @method string|null getHouseNumberAdd() |
||
30 | * @method string getStreet() |
||
31 | * @method string getCity() |
||
32 | * @method string getCountryCode() |
||
33 | * @method string getLanguage() |
||
34 | * @method string getEmail() |
||
35 | * @method string getTelephone() |
||
36 | * @method array getSubscriptions() |
||
37 | * @method DateTimeImmutable getCreatedAt() |
||
38 | * @method DateTimeImmutable getUpdatedAt() |
||
39 | */ |
||
40 | final class CustomerProxy extends AbstractProxy implements CustomerInterface |
||
41 | { |
||
42 | /** |
||
43 | * @return Customer |
||
44 | */ |
||
45 | protected function __load(eCurringClientInterface $client, string $id) |
||
46 | { |
||
47 | return $client->getCustomer($id); |
||
0 ignored issues
–
show
|
|||
48 | } |
||
49 | } |
||
50 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: