| 1 | <?php |
||
| 7 | final class Damage |
||
| 8 | { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | private $authorName; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var float |
||
| 17 | */ |
||
| 18 | private $amount; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var int |
||
| 22 | */ |
||
| 23 | private $id; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var bool |
||
| 27 | */ |
||
| 28 | private $invoiced; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param string $authorName |
||
| 32 | * @param float $amount |
||
| 33 | * @param int $id |
||
| 34 | * @param bool $invoiced |
||
| 35 | */ |
||
| 36 | public function __construct($authorName, $amount, $id, $invoiced) |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param array $properties |
||
| 46 | * |
||
| 47 | * @return Damage |
||
| 48 | */ |
||
| 49 | public static function fromArray(array $properties){ |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | public function getAuthorName() |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return float |
||
| 68 | */ |
||
| 69 | public function getAmount() |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return int |
||
| 76 | */ |
||
| 77 | public function getId() |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @return bool |
||
| 84 | */ |
||
| 85 | public function isInvoiced() |
||
| 89 | } |