*/ private array $revenue = []; public function __construct(private ?\DateTime $begin, private ?\DateTime $end) { } public function getBegin(): ?\DateTime { return $this->begin; } public function getEnd(): ?\DateTime { return $this->end; } public function getRevenue(): array { return $this->revenue; } public function addRevenue(string $currency, float $revenue): void { if (!\array_key_exists($currency, $this->revenue)) { $this->revenue[$currency] = 0.0; } $this->revenue[$currency] += $revenue; } }