src/Service/PhpArray.php
private function validateRates(array $rates)
    {
        foreach ($rates as $rate) {
            if (!is_scalar($rate)) {
                throw new \InvalidArgumentException(sprintf(
                    'Rates passed to the PhpArray service must be scalars, "%s" given.',
                    gettype($rate)
                ));
            }
        }
    }
private function validateRates(array $rates)
    {
        foreach ($rates as $rate) {
            if (!is_scalar($rate)) {
                throw new \InvalidArgumentException(sprintf(
                    'Rates passed to the PhpArray service must be scalars, "%s" given.',
                    gettype($rate)
                ));
            }
        }
    }
private function validateRates ( array $ rates ) { foreach ( $ rates as $ rate ) { if ( ! is_scalar ( $ rate ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Rates passed to the PhpArray service must be scalars, "%s" given.' , gettype ( $ rate ) ) ) ; } } }
Validate the rates array.

@param array $rates

@throws \InvalidArgumentException
Validate the rates array .