for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Popy\Calendar\ValueObject\DateRepresentation;
/**
* Popy\Calendar\ValueObject\DateSolarRepresentationInterface implementatuon.
*/
trait DateSolarTrait
{
* Year
*
* @var integer|null
protected $year;
* Is leap year
* @var boolean|null
protected $leapYear;
* Day Index
protected $dayIndex;
protected $eraDayIndex;
* @inheritDoc
public function getYear()
return $this->year;
}
public function isLeapYear()
return $this->leapYear;
public function getDayIndex()
return $this->dayIndex;
public function getEraDayIndex()
return $this->eraDayIndex;
public function withYear($year, $isLeap)
$res = clone $this;
$res->year = $year;
$res->leapYear = $isLeap;
return $res;
public function withDayIndex($dayIndex, $eraDayIndex)
$res->dayIndex = $dayIndex;
$res->eraDayIndex = $eraDayIndex;