| Total Complexity | 6 | 
| Total Lines | 35 | 
| Duplicated Lines | 0 % | 
| Coverage | 100% | 
| Changes | 0 | ||
| 1 | <?php | ||
| 9 | trait AsCheckoutProduct | ||
| 10 | { | ||
| 11 | 5 | public function checkoutProductTitle(): string | |
| 12 |     { | ||
| 13 | 5 | return (string) $this->title; | |
| 14 | } | ||
| 15 | |||
| 16 | 5 | public function checkoutProductPrice(): int | |
| 17 |     { | ||
| 18 | 5 | return (int) $this->price; | |
| 19 | } | ||
| 20 | |||
| 21 | 5 | public function checkoutProductMeta(): array | |
| 22 |     { | ||
| 23 | 5 | return array_merge(CartProduct::getModelDataAsEntity($this), $this->checkoutProductGeneralMeta()); | |
|  | |||
| 24 | } | ||
| 25 | |||
| 26 | 4 | public function checkoutProductGeneralMeta(): array | |
| 27 |     { | ||
| 28 | 4 | return []; | |
| 29 | } | ||
| 30 | |||
| 31 | 5 | public function checkoutProductClass(): string | |
| 32 |     { | ||
| 33 | 5 | return Product::class; | |
| 34 | } | ||
| 35 | |||
| 36 | 5 | public function toCheckoutProduct(array $meta = []): ProductInterface | |
| 44 | ); | ||
| 45 | } | ||
| 46 | } | ||
| 47 |