protected function getFilesNamespace($file)
    {
        $namespace = null;

        if (is_array($file)) {
            // We are using a custom namespace
            $namespace = $this->sanitizeNamespace($file[1]);
            $file = $file[0];
            return [$namespace, $file];

        } else {
            // We are namespacing using the file's name
            $filename = rtrim($file->getBasename(), '.' . $file->getExtension());
            $namespace = $this->sanitizeNamespace($filename);
            return [$namespace, $file];
        }
    }
protected function getFilesNamespace($file)
    {
        $namespace = null;

        if (is_array($file)) {
            // We are using a custom namespace
            $namespace = $this->sanitizeNamespace($file[1]);
            $file = $file[0];
            return [$namespace, $file];

        } else {
            // We are namespacing using the file's name
            $filename = rtrim($file->getBasename(), '.' . $file->getExtension());
            $namespace = $this->sanitizeNamespace($filename);
            return [$namespace, $file];
        }
    }
protected function getFilesNamespace ( $ file ) { $ namespace = null ; if ( is_array ( $ file ) ) { // We are using a custom namespace $ namespace = $ this -> sanitizeNamespace ( $ file [ 1 ] ) ; $ file = $ file [ 0 ] ; return [ $ namespace , $ file ] ; } else { // We are namespacing using the file's name $ filename = rtrim ( $ file -> getBasename ( ) , '.' . $ file -> getExtension ( ) ) ; $ namespace = $ this -> sanitizeNamespace ( $ filename ) ; return [ $ namespace , $ file ] ; } }
Gets or creates the file's namespace
@param $file
@return array with the namespace and fileobject
Gets or creates the file s namespace