for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Todo\Domain;
/**
* Class Task
*
* @category None
* @package Domain\Model
* @author Martin Pham <[email protected]>
* @license None http://
* @link None
*/
class Task implements \JsonSerializable
{
const STATUS_REMAINING = 'remaining';
const STATUS_COMPLETED = 'completed';
protected $id;
protected $name;
protected $status = Task::STATUS_REMAINING;
protected $createdAt;
protected $updatedAt;
* Get Id
* @return mixed
public function getId()
return $this->id;
}
* Set Id
* @param mixed $id Id
public function setId($id)
$this->id = $id;
* Get Name
public function getName()
return $this->name;
* Set Name
* @param mixed $name Name
public function setName($name)
$this->name = $name;
* Get Status
public function getStatus()
return $this->status;
* Set Status
* @param mixed $status Status
public function setStatus($status)
$this->status = $status;
* Get CreatedAt
public function getCreatedAt()
return $this->createdAt;
* Set CreatedAt
* @param mixed $createdAt CreatedAt
public function setCreatedAt($createdAt)
$this->createdAt = $createdAt;
* Get UpdatedAt
public function getUpdatedAt()
return $this->updatedAt;
* Set UpdatedAt
* @param mixed $updatedAt UpdatedAt
public function setUpdatedAt($updatedAt)
$this->updatedAt = $updatedAt;
* @inheritDoc
public function jsonSerialize()
return [
'id' => $this->getId(),
'name' => $this->getName(),
'status' => $this->getStatus()
];