src/Common/Tax.php
public function getAmount($baseAmount = null)
    {
        if (is_numeric($this->getFixedAmount())) {
            return $this->getFixedAmount();
        }

        if (null === $baseAmount) {
            $baseAmount = $this->getBaseAmount();
        }

        return round($baseAmount * $this->getRate() / 100, 2);
    }
public function getAmount($baseAmount = null)
    {
        if (is_numeric($this->getFixedAmount())) {
            return $this->getFixedAmount();
        }

        if (null === $baseAmount) {
            $baseAmount = $this->getBaseAmount();
        }

        return round($baseAmount * $this->getRate() / 100, 2);
    }
public function getAmount ( $ baseAmount = null ) { if ( is_numeric ( $ this -> getFixedAmount ( ) ) ) { return $ this -> getFixedAmount ( ) ; } if ( null === $ baseAmount ) { $ baseAmount = $ this -> getBaseAmount ( ) ; } return round ( $ baseAmount * $ this -> getRate ( ) / 100 , 2 ) ; }
Get tax amount from a given base amount

@param float $baseAmount
@return float
Get tax amount from a given base amount