for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Slince/China package.
*
* (c) Slince <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace China\Holiday;
class Holiday implements HolidayInterface
{
/**
* @var string
protected $name;
protected $type;
* {@inheritdoc}
protected $date;
public function __construct($name, $type, DateInterface $date)
$this->name = $name;
$this->type = $type;
$this->date = $date;
}
public function getName()
return $this->name;
public function getType()
return $this->type;
public function getDate()
return $this->date;
public function jsonSerialize()
return [
'name' => $this->name,
'type' => $this->type,
'date' => $this->date,
];