public static function machineName($string, $pattern = '/[^a-zA-Z0-9\-]/')
    {
        if (!is_string($string)) {
            throw new \InvalidArgumentException(
                'A non string argument has been given.'
            );
        }
        $string = strtr($string, ' ', '-');

        return strtolower(self::cleanString($string, $pattern));
    }