public function transform($value)
    {
        if (null === $value) {
            return '';
        }

        if (!is_numeric($value)) {
            throw new TransformationFailedException('Expected a numeric.');
        }

        $formatter = $this->getNumberFormatter(\NumberFormatter::PERCENT);
        $value = $formatter->format($value);

        return $value;
    }
public function transform($value)
    {
        if (null === $value) {
            return '';
        }

        if (!is_numeric($value)) {
            throw new TransformationFailedException('Expected a numeric.');
        }

        $formatter = $this->getNumberFormatter(\NumberFormatter::PERCENT);
        $value = $formatter->format($value);

        return $value;
    }
public function transform ( $ value ) { if ( null === $ value ) { return '' ; } if ( ! is_numeric ( $ value ) ) { throw new TransformationFailedException ( 'Expected a numeric.' ) ; } $ formatter = $ this -> getNumberFormatter ( \ NumberFormatter :: PERCENT ) ; $ value = $ formatter -> format ( $ value ) ; return $ value ; }
Transforms a number type into localized percent.

@param int|float $value Number value

@return string Localized value

@throws TransformationFailedException if the given value is not numeric
Transforms a number type into localized percent .