src/PrestaShop/Invoice/Creator.php
public function mergeProductLines(array $productLines, array $taxLines)
    {
        $result = array();
        // Key the product lines on id_order_detail, so we can easily add the
        // tax lines in the 2nd loop.
        foreach ($productLines as $productLine) {
            $result[$productLine['id_order_detail']] = $productLine;
        }
        // Add the tax lines without overwriting existing entries (though in a
        // consistent db the same keys should contain the same values).
        foreach ($taxLines as $taxLine) {
            $result[$taxLine['id_order_detail']] += $taxLine;
        }
        return $result;
    }
public function mergeProductLines(array $productLines, array $taxLines)
    {
        $result = array();
        // Key the product lines on id_order_detail, so we can easily add the
        // tax lines in the 2nd loop.
        foreach ($productLines as $productLine) {
            $result[$productLine['id_order_detail']] = $productLine;
        }
        // Add the tax lines without overwriting existing entries (though in a
        // consistent db the same keys should contain the same values).
        foreach ($taxLines as $taxLine) {
            $result[$taxLine['id_order_detail']] += $taxLine;
        }
        return $result;
    }
public function mergeProductLines ( array $ productLines , array $ taxLines ) { $ result = array ( ) ; // Key the product lines on id_order_detail, so we can easily add the // tax lines in the 2nd loop. foreach ( $ productLines as $ productLine ) { $ result [ $ productLine [ 'id_order_detail' ] ] = $ productLine ; } // Add the tax lines without overwriting existing entries (though in a // consistent db the same keys should contain the same values). foreach ( $ taxLines as $ taxLine ) { $ result [ $ taxLine [ 'id_order_detail' ] ] += $ taxLine ; } return $ result ; }
Merges the product and tax details arrays.

@param array $productLines
@param array $taxLines

@return array
Merges the product and tax details arrays .