/**
* @return OrderLineItemEntity[]
*/
public function filterGoodsFlat(): array
{ $lineItems =
$this->
buildFlat($this);
$filtered =
[];
foreach ($lineItems as $lineItem) { if ($lineItem->
getGood()) { $filtered[] =
$lineItem;
} } return $filtered;
} public function hasLineItemWithState(string
$state): bool
{ foreach ($this->
buildFlat($this) as $lineItem) { if (\
in_array($state,
$lineItem->
getStates(), true
)) {