protected function checkProjectName()
    {
        if (is_dir($this->projectDir) && !$this->isEmptyDirectory($this->projectDir)) {
            throw new \RuntimeException(sprintf(
                "There is already a '%s' project in this directory (%s).\n".
                'Change your project name or create it in another directory.',
                $this->projectName, $this->projectDir
            ));
        }

        if ('demo' === $this->projectName && 'new' === $this->getName()) {
            $this->output->writeln("\n <bg=yellow> TIP </> If you want to download the Symfony Demo app, execute 'symfony demo' instead of 'symfony new demo'");
        }

        return $this;
    }
protected function checkProjectName()
    {
        if (is_dir($this->projectDir) && !$this->isEmptyDirectory($this->projectDir)) {
            throw new \RuntimeException(sprintf(
                "There is already a '%s' project in this directory (%s).\n".
                'Change your project name or create it in another directory.',
                $this->projectName, $this->projectDir
            ));
        }

        if ('demo' === $this->projectName && 'new' === $this->getName()) {
            $this->output->writeln("\n <bg=yellow> TIP </> If you want to download the Symfony Demo app, execute 'symfony demo' instead of 'symfony new demo'");
        }

        return $this;
    }
protected function checkProjectName ( ) { if ( is_dir ( $ this -> projectDir ) && ! $ this -> isEmptyDirectory ( $ this -> projectDir ) ) { throw new \ RuntimeException ( sprintf ( "There is already a '%s' project in this directory (%s).\n" . 'Change your project name or create it in another directory.' , $ this -> projectName , $ this -> projectDir ) ) ; } if ( 'demo' === $ this -> projectName && 'new' === $ this -> getName ( ) ) { $ this -> output -> writeln ( "\n <bg=yellow> TIP </> If you want to download the Symfony Demo app, execute 'symfony demo' instead of 'symfony new demo'" ) ; } return $ this ; }
Checks the project name.

@return $this

@throws \RuntimeException If there is already a projet in the specified directory
Checks the project name .