| 1 | <?php |
||
| 15 | class Complaint |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $address; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var \DateTime |
||
| 24 | */ |
||
| 25 | private $createdAt; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $address |
||
| 29 | */ |
||
| 30 | private function __construct($address) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param array $data |
||
| 38 | * |
||
| 39 | * @return Complaint |
||
| 40 | */ |
||
| 41 | public static function create(array $data) |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | public function getAddress() |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return \DateTime |
||
| 62 | */ |
||
| 63 | public function getCreatedAt() |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @param \DateTime $createdAt |
||
| 70 | */ |
||
| 71 | private function setCreatedAt(\DateTime $createdAt) |
||
| 75 | } |
||
| 76 |