Passed
Push — trunk ( b25d7b...3c7131 )
by Christian
11:39 queued 13s
created

RecurringDataStruct::getSubscriptionId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Shopware\Core\Checkout\Payment\Cart\Recurring;
4
5
use Shopware\Core\Framework\Log\Package;
6
use Shopware\Core\Framework\Struct\Struct;
7
8
/**
9
 * @experimental This is an experimental payment struct to make generic subscription informations available without relying as an payment handler to a specific subscription extensions
10
 */
11
#[Package('checkout')]
12
class RecurringDataStruct extends Struct
13
{
14
    /**
15
     * @internal
16
     */
17
    public function __construct(
18
        protected string $subscriptionId,
19
        protected \DateTimeInterface $nextSchedule,
20
    ) {
21
    }
22
23
    public function getSubscriptionId(): string
24
    {
25
        return $this->subscriptionId;
26
    }
27
28
    public function getNextSchedule(): \DateTimeInterface
29
    {
30
        return $this->nextSchedule;
31
    }
32
}
33