private function saveClassToFile(PhpClass $class)
    {
        if ($this->isValidClass($class)) {
            $file = new PhpFile($class->getIdentifier());

            $namespace = $this->config->get('namespaceName');
            if (!empty($namespace)) {
                $file->addNamespace($namespace);
            }

            $file->addClass($class);
            $file->save($this->dir);
        }
    }
private function saveClassToFile(PhpClass $class)
    {
        if ($this->isValidClass($class)) {
            $file = new PhpFile($class->getIdentifier());

            $namespace = $this->config->get('namespaceName');
            if (!empty($namespace)) {
                $file->addNamespace($namespace);
            }

            $file->addClass($class);
            $file->save($this->dir);
        }
    }
private function saveClassToFile ( PhpClass $ class ) { if ( $ this -> isValidClass ( $ class ) ) { $ file = new PhpFile ( $ class -> getIdentifier ( ) ) ; $ namespace = $ this -> config -> get ( 'namespaceName' ) ; if ( ! empty ( $ namespace ) ) { $ file -> addNamespace ( $ namespace ) ; } $ file -> addClass ( $ class ) ; $ file -> save ( $ this -> dir ) ; } }
Append a class to a file and save it
If no file is created the name of the class is the filename

@param PhpClass $class
Append a class to a file and save it If no file is created the name of the class is the filename