src/Sulu/Bundle/Sales/CoreBundle/Pricing/ItemPriceCalculator.php
protected function validateItem($item)
    {
        // validate not null
        $this->validateNotNull('quantity', $item->getCalcQuantity());

        // validate discount
        $discountPercent = $item->getCalcDiscount();
        if ($discountPercent < 0 || $discountPercent > 100) {
            throw new PriceCalculationException('Discount must be within 0 and 100 percent');
        }
    }
protected function validateItem($item)
    {
        // validate not null
        $this->validateNotNull('quantity', $item->getCalcQuantity());

        // validate discount
        $discountPercent = $item->getCalcDiscount();
        if ($discountPercent < 0 || $discountPercent > 100) {
            throw new PriceCalculationException('Discount must be within 0 and 100 percent');
        }
    }
protected function validateItem ( $ item ) { // validate not null $ this -> validateNotNull ( 'quantity' , $ item -> getCalcQuantity ( ) ) ; // validate discount $ discountPercent = $ item -> getCalcDiscount ( ) ; if ( $ discountPercent < 0 || $ discountPercent > 100 ) { throw new PriceCalculationException ( 'Discount must be within 0 and 100 percent' ) ; } }
Validate item values

@param $item

@throws PriceCalculationException
Validate item values