Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function create(PaymentMethodInterface $paymentMethod, string $locale): PaymentMethodView |
||
21 | { |
||
22 | $translation = $paymentMethod->getTranslation($locale); |
||
23 | |||
24 | /** @var PaymentMethodView $paymentMethodView */ |
||
25 | $paymentMethodView = new $this->paymentMethodViewClass(); |
||
26 | $paymentMethodView->code = $paymentMethod->getCode() ?? ''; |
||
27 | $paymentMethodView->name = $translation->getName() ?? ''; |
||
|
|||
28 | $paymentMethodView->description = $translation->getDescription() ?? ''; |
||
29 | |||
30 | return $paymentMethodView; |
||
31 | } |
||
33 |