xxxxxxxxxx
public function __construct(array $linesData)
{
foreach (array_values($linesData) as $index => [$productId, $quantity]) {
$this->lines[] = new Line(
$index + 1,
$productId,
$quantity
);
}
}