src/Magento/Invoice/FlattenerInvoiceLines.php
protected function isChildSameAsParent(array $parent, array $children)
    {
        if (count($children) === 1) {
            $child = reset($children);
            if ($parent[Tag::ItemNumber] === $child[Tag::ItemNumber]
              && $parent[Tag::Quantity] === $child[Tag::Quantity]
              && Number::isZero($child[Tag::UnitPrice])
            ) {
                return true;
            }
        }
        return false;
    }
protected function isChildSameAsParent(array $parent, array $children)
    {
        if (count($children) === 1) {
            $child = reset($children);
            if ($parent[Tag::ItemNumber] === $child[Tag::ItemNumber]
              && $parent[Tag::Quantity] === $child[Tag::Quantity]
              && Number::isZero($child[Tag::UnitPrice])
            ) {
                return true;
            }
        }
        return false;
    }
protected function isChildSameAsParent ( array $ parent , array $ children ) { if ( count ( $ children ) === 1 ) { $ child = reset ( $ children ) ; if ( $ parent [ Tag :: ItemNumber ] === $ child [ Tag :: ItemNumber ] && $ parent [ Tag :: Quantity ] === $ child [ Tag :: Quantity ] && Number :: isZero ( $ child [ Tag :: UnitPrice ] ) ) { return true ; } } return false ; }
Returns whether a single child line is actually the same as its parent.

If:
- there is exactly 1 child line
- for the same item number and quantity
- with no price info on the child
We seem to be processing a configurable product that for some reason
appears twice: do not add the child, but copy the product description
to the result as it contains more option descriptions.

@param array $parent
@param array[] $children

@return bool
True if the single child line is actually the same as its parent.
Returns whether a single child line is actually the same as its parent .