| 1 | <?php |
||
| 9 | final class TotalDamage extends ViewModel |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var float |
||
| 14 | */ |
||
| 15 | private $amount; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var int |
||
| 19 | */ |
||
| 20 | private $authorId; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | private $authorName; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var bool |
||
| 29 | */ |
||
| 30 | private $invoiced; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param float $amount |
||
| 34 | * @param int $authorId |
||
| 35 | * @param string $authorName |
||
| 36 | * @param bool $invoiced |
||
| 37 | */ |
||
| 38 | public function __construct($amount, $authorId, $authorName, $invoiced) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param array $values |
||
| 48 | * |
||
| 49 | * @return mixed |
||
| 50 | */ |
||
| 51 | public static function fromArray(array $values) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return float |
||
| 58 | */ |
||
| 59 | public function getAmount() |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @return int |
||
| 66 | */ |
||
| 67 | public function getAuthorId() |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @return bool |
||
| 74 | */ |
||
| 75 | public function isInvoiced() |
||
| 79 | |||
| 80 | /** |
||
| 81 | * @return string |
||
| 82 | */ |
||
| 83 | public function getAuthorName() |
||
| 87 | |||
| 88 | } |