/**
* `get()` returns the product line-item with the given product id.
*
* @param string $productId The id of the product, of which the line-item should be returned.
*
* @return ItemFacade|null The line-item associated with the given product id, or null if it does not exist.
*
* @example payload-cases/payload-cases.twig 5 1 Get a product line-item by id.
*/
public function get(string
$productId): ?ItemFacade
{ $item =
$this->
_get($productId);
if ($item === null
) { return null;
} if ($item->
getType() !== LineItem::PRODUCT_LINE_ITEM_TYPE
) { return null;
} return $item;
}