protected function buildName($name)
    {
        $name = preg_replace('/([A-Z]{1})/', ' $1', $name);

        $name = ucfirst($name);

        return trim($name);
    }
protected function buildName($name)
    {
        $name = preg_replace('/([A-Z]{1})/', ' $1', $name);

        $name = ucfirst($name);

        return trim($name);
    }
protected function buildName ( $ name ) { $ name = preg_replace ( '/([A-Z]{1})/' , ' $1' , $ name ) ; $ name = ucfirst ( $ name ) ; return trim ( $ name ) ; }
Humanize name, adding a space before each capital

@param string $name
@return string
Humanize name adding a space before each capital