src/PaymentSlipData.php
protected function getAccountDigits()
    {
        if (!$this->getWithAccountNumber()) {
            throw new DisabledDataException('account number');
        }
        if ($this->getNotForPayment()) {
            return 'XXXXXXXXX';
        }
        $accountNumber = $this->getAccountNumber();
        if ($accountNumber === '') {
            return $accountNumber;
        }
        $accountDigits = str_replace('-', '', $accountNumber, $replacedHyphens);
        if ($replacedHyphens != 2) {
            throw new PaymentSlipException('Invalid Account number. Does not contain two hyphens.');
        }
        return $accountDigits;
    }
protected function getAccountDigits()
    {
        if (!$this->getWithAccountNumber()) {
            throw new DisabledDataException('account number');
        }
        if ($this->getNotForPayment()) {
            return 'XXXXXXXXX';
        }
        $accountNumber = $this->getAccountNumber();
        if ($accountNumber === '') {
            return $accountNumber;
        }
        $accountDigits = str_replace('-', '', $accountNumber, $replacedHyphens);
        if ($replacedHyphens != 2) {
            throw new PaymentSlipException('Invalid Account number. Does not contain two hyphens.');
        }
        return $accountDigits;
    }
protected function getAccountDigits ( ) { if ( ! $ this -> getWithAccountNumber ( ) ) { throw new DisabledDataException ( 'account number' ) ; } if ( $ this -> getNotForPayment ( ) ) { return 'XXXXXXXXX' ; } $ accountNumber = $ this -> getAccountNumber ( ) ; if ( $ accountNumber === '' ) { return $ accountNumber ; } $ accountDigits = str_replace ( '-' , '' , $ accountNumber , $ replacedHyphens ) ; if ( $ replacedHyphens != 2 ) { throw new PaymentSlipException ( 'Invalid Account number. Does not contain two hyphens.' ) ; } return $ accountDigits ; }
Clear the account of the two hyphens

@return string The account of the two hyphens, 'XXXXXXXXX' if not for payment or else false.
@throws DisabledDataException If the data is disabled.
@throws PaymentSlipException If account number does not contain two hyphens.
@todo Cover the edge cases with tests
Clear the account of the two hyphens