SubscriptionProxy   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 2
dl 0
loc 8
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __load() 0 3 1
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\CustomerInterface;
10
use LauLamanApps\eCurring\Resource\ProductInterface;
11
use LauLamanApps\eCurring\Resource\Subscription;
12
use LauLamanApps\eCurring\Resource\Subscription\Mandate;
13
use LauLamanApps\eCurring\Resource\Subscription\Status;
14
use LauLamanApps\eCurring\Resource\SubscriptionInterface;
15
use LauLamanApps\eCurring\Resource\TransactionInterface;
16
17
/**
18
 * @method int getId()
19
 * @method Mandate getMandate()
20
 * @method DateTimeImmutable getStartDate()
21
 * @method Status getStatus()
22
 * @method DateTimeImmutable|null getCancelDate()
23
 * @method DateTimeImmutable|null getResumeDate()
24
 * @method string getConfirmationPage()
25
 * @method bool isConfirmationSent()
26
 * @method string|null getSubscriptionWebhookUrl()
27
 * @method string|null getTransactionWebhookUrl()
28
 * @method string|null getSuccessRedirectUrl()
29
 * @method ProductInterface getSubscriptionPlan()
30
 * @method CustomerInterface getCustomer()
31
 * @method TransactionInterface[]|null getTransactions()
32
 * @method DateTimeImmutable getCreatedAt()
33
 * @method DateTimeImmutable getUpdatedAt()
34
 */
35
final class SubscriptionProxy extends AbstractProxy implements SubscriptionInterface
36
{
37
    /**
38
     * @return Subscription
39
     */
40
    protected function __load(eCurringClientInterface $client, string $id)
41
    {
42
        return $client->getSubscription($id);
43
    }
44
}
45