public static function make($data, $secure = false)
    {
        // Recovery of the function at the lance.
        $method = $secure === true ? 'secure' : 'data';

        // Strict integer regex
        $rNum = '/^[0-9]+(\.[0-9]+)?$/';

        if (is_string($data)) {
            if (! preg_match($rNum, $data, $match)) {
                return static::$method($data);
            }

            if (count($match) == 2) {
                $data = (float) $data;
            } else {
                $data = (int) $data;
            }

            return $data;
        }

        if (is_numeric($data)) {
            return $data;
        }

        if (is_array($data)) {
            foreach ($data as $key => $value) {
                $data[$key] = static::make($value, $secure);
            }
            return $data;
        }

        if (is_object($data)) {
            foreach ($data as $key => $value) {
                $data->$key = static::make($value, $secure);
            }
            return $data;
        }

        return $data;
    }
public static function make($data, $secure = false)
    {
        // Recovery of the function at the lance.
        $method = $secure === true ? 'secure' : 'data';

        // Strict integer regex
        $rNum = '/^[0-9]+(\.[0-9]+)?$/';

        if (is_string($data)) {
            if (! preg_match($rNum, $data, $match)) {
                return static::$method($data);
            }

            if (count($match) == 2) {
                $data = (float) $data;
            } else {
                $data = (int) $data;
            }

            return $data;
        }

        if (is_numeric($data)) {
            return $data;
        }

        if (is_array($data)) {
            foreach ($data as $key => $value) {
                $data[$key] = static::make($value, $secure);
            }
            return $data;
        }

        if (is_object($data)) {
            foreach ($data as $key => $value) {
                $data->$key = static::make($value, $secure);
            }
            return $data;
        }

        return $data;
    }
public static function make ( $ data , $ secure = false ) { // Recovery of the function at the lance. $ method = $ secure === true ? 'secure' : 'data' ; // Strict integer regex $ rNum = '/^[0-9]+(\.[0-9]+)?$/' ; if ( is_string ( $ data ) ) { if ( ! preg_match ( $ rNum , $ data , $ match ) ) { return static :: $ method ( $ data ) ; } if ( count ( $ match ) == 2 ) { $ data = ( float ) $ data ; } else { $ data = ( int ) $ data ; } return $ data ; } if ( is_numeric ( $ data ) ) { return $ data ; } if ( is_array ( $ data ) ) { foreach ( $ data as $ key => $ value ) { $ data [ $ key ] = static :: make ( $ value , $ secure ) ; } return $ data ; } if ( is_object ( $ data ) ) { foreach ( $ data as $ key => $ value ) { $ data -> $ key = static :: make ( $ value , $ secure ) ; } return $ data ; } return $ data ; }
To clean the data

@param mixed $data
@param bool  $secure

@return mixed
To clean the data