Total Complexity | 2 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | final class WishlistTokenValueAwareInputCommandDataTransformer implements CommandDataTransformerInterface |
||
19 | { |
||
20 | /** |
||
21 | * @param WishlistTokenValueAwareInterface|mixed $object |
||
22 | */ |
||
23 | public function transform( |
||
24 | $object, |
||
25 | string $to, |
||
26 | array $context = [] |
||
27 | ): WishlistTokenValueAwareInterface { |
||
28 | /** @var WishlistInterface $wishlist */ |
||
29 | $wishlist = $context[AbstractItemNormalizer::OBJECT_TO_POPULATE]; |
||
30 | |||
31 | $object->setWishlist($wishlist); |
||
32 | |||
33 | return $object; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @param WishlistTokenValueAwareInterface|mixed $object |
||
38 | */ |
||
39 | public function supportsTransformation($object): bool |
||
42 | } |
||
43 | } |
||
44 |