1 | <?php |
||
8 | class PaymentScheduleConfig implements PaymentScheduleConfigInterface |
||
9 | { |
||
10 | private $noOfPayments; |
||
11 | private $startDate; |
||
12 | private $averageIntervalLength = 0; |
||
13 | private $dateInterval; |
||
14 | private $firstPaymentDate; |
||
15 | |||
16 | /** |
||
17 | * PaymentScheduleConfig constructor. |
||
18 | * @param int $noOfPayments |
||
19 | * @param \DateTimeInterface $startDate |
||
20 | * @param string $dateIntervalPattern |
||
21 | * @param \DateTimeInterface|null $firstPaymentDate |
||
22 | */ |
||
23 | 8 | public function __construct( |
|
40 | |||
41 | /** |
||
42 | * @param \DateInterval $dateInterval |
||
43 | * @return int |
||
44 | */ |
||
45 | 8 | private function extractIntervalLength(\DateInterval $dateInterval): int |
|
62 | |||
63 | /** |
||
64 | * @return int |
||
65 | */ |
||
66 | 7 | public function getNoOfPayments(): int |
|
70 | |||
71 | /** |
||
72 | * @return \DateTimeInterface |
||
73 | */ |
||
74 | 7 | public function getStartDate(): \DateTimeInterface |
|
78 | |||
79 | /** |
||
80 | * @return int |
||
81 | */ |
||
82 | 1 | public function getAverageIntervalLength(): int |
|
83 | { |
||
84 | 1 | return $this->averageIntervalLength; |
|
85 | } |
||
86 | |||
87 | /** |
||
88 | * @return \DateInterval |
||
89 | */ |
||
90 | 7 | public function getDateInterval(): \DateInterval |
|
94 | |||
95 | /** |
||
96 | * @return \DateTimeInterface|null |
||
97 | */ |
||
98 | 7 | public function getFirstPaymentDate(): ?\DateTimeInterface |
|
102 | } |
||
103 |