Text.php
public static function formatSiret($value): string
    {
        $value = (string) (int) $value;
        if (!self::isSiret($value)) {
            return '';
        }
        return preg_replace('/^([0-9]{3})([0-9]{3})([0-9]{3})([0-9]{5})$/', '$1 $2 $3 $4', $value);
    }
public static function formatSiret($value): string
    {
        $value = (string) (int) $value;
        if (!self::isSiret($value)) {
            return '';
        }
        return preg_replace('/^([0-9]{3})([0-9]{3})([0-9]{3})([0-9]{5})$/', '$1 $2 $3 $4', $value);
    }
public static function formatSiret ( $ value ) : string { $ value = ( string ) ( int ) $ value ; if ( ! self :: isSiret ( $ value ) ) { return '' ; } return preg_replace ( '/^([0-9]{3})([0-9]{3})([0-9]{3})([0-9]{5})$/' , '$1 $2 $3 $4' , $ value ) ; }
Format a siret number with 14 digits
@param string $value
@return string
Format a siret number with 14 digits