| 1 | <?php  | 
            ||
| 11 | class PaymentPeriods implements PaymentPeriodsInterface  | 
            ||
| 12 | { | 
            ||
| 13 | /**  | 
            ||
| 14 | * @var array  | 
            ||
| 15 | */  | 
            ||
| 16 | private $periods = array();  | 
            ||
| 17 | /**  | 
            ||
| 18 | * @var int  | 
            ||
| 19 | */  | 
            ||
| 20 | private $averagePeriodLenght;  | 
            ||
| 21 | |||
| 22 | /**  | 
            ||
| 23 | * PaymentPeriods constructor.  | 
            ||
| 24 | * @param int $averagePeriodLength  | 
            ||
| 25 | */  | 
            ||
| 26 | 5 | public function __construct(int $averagePeriodLength)  | 
            |
| 30 | |||
| 31 | /**  | 
            ||
| 32 | * @param PeriodInterface $period  | 
            ||
| 33 | * @param int|null $sequenceNo  | 
            ||
| 34 | */  | 
            ||
| 35 | 5 | public function add(PeriodInterface $period, int $sequenceNo = null): void  | 
            |
| 44 | |||
| 45 | 3 | public function getAvgPeriodLength(): float  | 
            |
| 49 | |||
| 50 | /**  | 
            ||
| 51 | * @return array  | 
            ||
| 52 | */  | 
            ||
| 53 | 5 | public function getPeriods(): array  | 
            |
| 57 | |||
| 58 | /**  | 
            ||
| 59 | * @return int  | 
            ||
| 60 | */  | 
            ||
| 61 | 2 | public function getNoOfPeriods(): int  | 
            |
| 65 | }  | 
            ||
| 66 |