<?php
namespace WPIS;

class PriceFilter {
    public static function transform( $value ){

        if( is_null($value) || $value === '' ){
            return '';
        }

        $value = floatval($value);
        $amount = new \NumberFormatter( 'fr_FR', \NumberFormatter::CURRENCY );
        $amount->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, 0);
        return $amount->format($value);
    }
}