Text.php
public static function ucPhrase($str): string
    {
        $str = mb_strtolower(self::cleanPhrase($str), self::ENCODING);
        $names = explode(' ', $str);
        array_walk($names, 'self::ucFirstTouch');
        $names = explode('-', implode(' ', $names));
        array_walk($names, 'self::ucFirstTouch');
        return implode('-', $names);
    }
public static function ucPhrase($str): string
    {
        $str = mb_strtolower(self::cleanPhrase($str), self::ENCODING);
        $names = explode(' ', $str);
        array_walk($names, 'self::ucFirstTouch');
        $names = explode('-', implode(' ', $names));
        array_walk($names, 'self::ucFirstTouch');
        return implode('-', $names);
    }
public static function ucPhrase ( $ str ) : string { $ str = mb_strtolower ( self :: cleanPhrase ( $ str ) , self :: ENCODING ) ; $ names = explode ( ' ' , $ str ) ; array_walk ( $ names , 'self::ucFirstTouch' ) ; $ names = explode ( '-' , implode ( ' ' , $ names ) ) ; array_walk ( $ names , 'self::ucFirstTouch' ) ; return implode ( '-' , $ names ) ; }
jean-albert dupont -> Jean-Albert Dupont
@param mixed $str
@return string
jean - albert dupont - > Jean - Albert Dupont