| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class EstimateDto |
||
| 8 | { |
||
| 9 | private $estimate; |
||
| 10 | private $type; |
||
| 11 | |||
| 12 | public static function fromArray(array $data): self |
||
| 13 | { |
||
| 14 | return new self( |
||
| 15 | $data['estimate'], |
||
| 16 | new EstimateType($data['type']) |
||
| 17 | ); |
||
| 18 | } |
||
| 19 | |||
| 20 | public function __construct(string $estimate, EstimateType $type) |
||
| 21 | { |
||
| 22 | $this->estimate = $estimate; |
||
| 23 | $this->type = $type; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function estimate(): string |
||
| 29 | } |
||
| 30 | |||
| 31 | public function type(): EstimateType |
||
| 36 |