1111use  Bavix \Wallet \Internal \Dto \BasketDto ;
1212use  Bavix \Wallet \Internal \Dto \BasketDtoInterface ;
1313use  Bavix \Wallet \Internal \Dto \ItemDto ;
14+ use  Bavix \Wallet \Internal \Dto \ItemDtoInterface ;
1415use  Bavix \Wallet \Internal \Exceptions \CartEmptyException ;
1516use  Bavix \Wallet \Internal \Exceptions \ExceptionInterface ;
1617use  Bavix \Wallet \Internal \Service \MathServiceInterface ;
17- use  Bavix \Wallet \Services \CastService ;
18+ use  Bavix \Wallet \Services \CastServiceInterface ;
1819use  function  count ;
1920use  Countable ;
2021use  function  get_class ;
@@ -31,12 +32,12 @@ final class Cart implements Countable, CartInterface
3132
3233    private  array  $ meta  = [];
3334
34-     private  CastService   $ castService ;
35+     private  CastServiceInterface   $ castService ;
3536
3637    private  MathServiceInterface   $ math ;
3738
3839    public  function  __construct (
39-         CastService   $ castService ,
40+         CastServiceInterface   $ castService ,
4041        MathServiceInterface   $ math
4142    ) {
4243        $ this  ->castService  = $ castService ;
@@ -117,7 +118,7 @@ public function getQuantity(Product $product): int
117118    public  function  getBasketDto (): BasketDtoInterface 
118119    {
119120        $ items  = array_map (
120-             fn  (Product   $ product ): ItemDto   => new  ItemDto ($ product , $ this  ->getQuantity ($ product )),
121+             fn  (Product   $ product ): ItemDtoInterface   => new  ItemDto ($ product , $ this  ->getQuantity ($ product )),
121122            $ this  ->getUniqueItems ()
122123        );
123124
0 commit comments