src/Invoice/FlattenerInvoiceLines.php
protected function getAppearingVatRates(array $lines)
    {
        $vatRates = array();
        foreach ($lines as $line) {
            if (isset($line[Tag::VatRate])) {
                $vatRate = sprintf('%.1f', $line[Tag::VatRate]);
                if (isset($vatRates[$vatRate])) {
                    $vatRates[$vatRate]++;
                } else {
                    $vatRates[$vatRate] = 1;
                }
            }
        }
        return $vatRates;
    }
protected function getAppearingVatRates(array $lines)
    {
        $vatRates = array();
        foreach ($lines as $line) {
            if (isset($line[Tag::VatRate])) {
                $vatRate = sprintf('%.1f', $line[Tag::VatRate]);
                if (isset($vatRates[$vatRate])) {
                    $vatRates[$vatRate]++;
                } else {
                    $vatRates[$vatRate] = 1;
                }
            }
        }
        return $vatRates;
    }
protected function getAppearingVatRates ( array $ lines ) { $ vatRates = array ( ) ; foreach ( $ lines as $ line ) { if ( isset ( $ line [ Tag :: VatRate ] ) ) { $ vatRate = sprintf ( '%.1f' , $ line [ Tag :: VatRate ] ) ; if ( isset ( $ vatRates [ $ vatRate ] ) ) { $ vatRates [ $ vatRate ] ++ ; } else { $ vatRates [ $ vatRate ] = 1 ; } } } return $ vatRates ; }
Returns a list of vat rates that actually appear in the given lines.

@param array[] $lines
an array of invoice lines.

@return array
An array with the vat rates as key and the number of times they appear
in the invoice lines as value.
Returns a list of vat rates that actually appear in the given lines .