public function filterByTaxId(string
$id): self
{ return $this->
filter(fn (ProductEntity
$product) =>
$product->
getTaxId() ===
$id);
} /**
* @return list<string>
*/
public function getManufacturerIds(): array
{ /** @var list<string> $ids */
$ids =
$this->
fmap(fn (ProductEntity
$product) =>
$product->
getManufacturerId());
return $ids;
} public function filterByManufacturerId(string
$id): self
{ return $this->
filter(fn (ProductEntity
$product) =>
$product->
getManufacturerId() ===
$id);
} /**
* @return list<string>
*/