Skip to content

Commit f793675

Browse files
committed
update dto
1 parent ef6ecd5 commit f793675

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/Internal/Dto/BasketDto.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function count(): int
3333

3434
public function total(): int
3535
{
36-
return count(array_merge(...array_map(static fn (ItemDtoInterface $dto) => $dto->items(), $this->items)));
36+
return iterator_count($this->cursor());
3737
}
3838

3939
/** @return Generator<array-key, Product, mixed, void> */

src/Internal/Dto/ItemDto.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
final class ItemDto implements ItemDtoInterface
1111
{
1212
private Product $product;
13-
1413
private int $quantity;
1514

1615
public function __construct(Product $product, int $quantity)

0 commit comments

Comments
 (0)