|
29 | 29 | final class CreateNewWishlistHandler |
30 | 30 | { |
31 | 31 | public function __construct( |
32 | | - private WishlistRepositoryInterface $wishlistRepository, |
33 | | - private TokenStorageInterface $tokenStorage, |
34 | | - private WishlistFactoryInterface $wishlistFactory, |
| 32 | + private WishlistRepositoryInterface $wishlistRepository, |
| 33 | + private TokenStorageInterface $tokenStorage, |
| 34 | + private WishlistFactoryInterface $wishlistFactory, |
35 | 35 | private WishlistCookieTokenResolverInterface $wishlistCookieTokenResolver, |
36 | | - private ChannelRepositoryInterface $channelRepository, |
37 | | - private WishlistNameCheckerInterface $wishlistNameChecker, |
38 | | - private TokenUserResolverInterface $tokenUserResolver, |
39 | | - ) |
40 | | - { |
| 36 | + private ChannelRepositoryInterface $channelRepository, |
| 37 | + private WishlistNameCheckerInterface $wishlistNameChecker, |
| 38 | + private TokenUserResolverInterface $tokenUserResolver, |
| 39 | + ) { |
41 | 40 | } |
42 | 41 |
|
43 | 42 | public function __invoke(CreateNewWishlist $createNewWishlist): int |
@@ -74,7 +73,7 @@ public function __invoke(CreateNewWishlist $createNewWishlist): int |
74 | 73 | } else { |
75 | 74 | /** @var WishlistInterface $newWishlist */ |
76 | 75 | foreach ($wishlists as $newWishlist) { |
77 | | - if (!$this->wishlistNameChecker->check((string)$newWishlist->getName(), $createNewWishlist->getName())) { |
| 76 | + if (!$this->wishlistNameChecker->check((string) $newWishlist->getName(), $createNewWishlist->getName())) { |
78 | 77 | $wishlist->setName($createNewWishlist->getName()); |
79 | 78 | } else { |
80 | 79 | throw new WishlistNameIsTakenException(); |
|
0 commit comments