private function normalizeNamespace($namespace)
    {
        $namespace = str_replace('\\\\', '\\', $namespace);
        $namespace = explode('\\', $namespace);

        array_walk($namespace, function (&$item) { $item = ucfirst($item); });

        return trim(implode('\\', $namespace), '\\');
    }
private function normalizeNamespace($namespace)
    {
        $namespace = str_replace('\\\\', '\\', $namespace);
        $namespace = explode('\\', $namespace);

        array_walk($namespace, function (&$item) { $item = ucfirst($item); });

        return trim(implode('\\', $namespace), '\\');
    }
private function normalizeNamespace ( $ namespace ) { $ namespace = str_replace ( '\\\\' , '\\' , $ namespace ) ; $ namespace = explode ( '\\' , $ namespace ) ; array_walk ( $ namespace , function ( & $ item ) { $ item = ucfirst ( $ item ) ; } ) ; return trim ( implode ( '\\' , $ namespace ) , '\\' ) ; }
Removes duplicates of backslashes and trims backslashes

@param string $namespace
@return string
Removes duplicates of backslashes and trims backslashes