| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function createByDto(PriceCreationDto $dto) |
||
| 19 | { |
||
| 20 | return new SinglePrice( |
||
| 21 | $dto->id, |
||
| 22 | new Target($dto->target_id, new Type($dto->target_type_id, $dto->target_type_name)), |
||
| 23 | new Type($dto->type_id, $dto->type), |
||
| 24 | Quantity::create($dto->unit, $dto->quantity), |
||
| 25 | new Money($dto->price, new Currency($dto->currency)) |
||
| 26 | ); |
||
| 27 | } |
||
| 28 | } |
||
| 29 |