protected function createStarterFiles()
    {
        $this->output->writeLn("Ensuring project files are present.");

        $count = 0;
        foreach ($this->starterFiles as $source => $file) {
            $label = $this->tree(++$count >= count($this->starterFiles));
            if (!file_exists($file)) {
                if (file_put_contents($file, fopen($this->srcUrl . $source, 'r')) > 0) {
                    $this->output->writeLn($label . $this->ok($file));
                } else {
                    $this->output->writeLn($label . $this->fail($file));
                    $this->flagFailing();
                }
            } else {
                $this->output->writeLn($label . $this->skip($file));
            }
        }

        $this->nl();
    }
protected function createStarterFiles()
    {
        $this->output->writeLn("Ensuring project files are present.");

        $count = 0;
        foreach ($this->starterFiles as $source => $file) {
            $label = $this->tree(++$count >= count($this->starterFiles));
            if (!file_exists($file)) {
                if (file_put_contents($file, fopen($this->srcUrl . $source, 'r')) > 0) {
                    $this->output->writeLn($label . $this->ok($file));
                } else {
                    $this->output->writeLn($label . $this->fail($file));
                    $this->flagFailing();
                }
            } else {
                $this->output->writeLn($label . $this->skip($file));
            }
        }

        $this->nl();
    }
protected function createStarterFiles ( ) { $ this -> output -> writeLn ( "Ensuring project files are present." ) ; $ count = 0 ; foreach ( $ this -> starterFiles as $ source => $ file ) { $ label = $ this -> tree ( ++ $ count >= count ( $ this -> starterFiles ) ) ; if ( ! file_exists ( $ file ) ) { if ( file_put_contents ( $ file , fopen ( $ this -> srcUrl . $ source , 'r' ) ) > 0 ) { $ this -> output -> writeLn ( $ label . $ this -> ok ( $ file ) ) ; } else { $ this -> output -> writeLn ( $ label . $ this -> fail ( $ file ) ) ; $ this -> flagFailing ( ) ; } } else { $ this -> output -> writeLn ( $ label . $ this -> skip ( $ file ) ) ; } } $ this -> nl ( ) ; }
Adds the starter file to a new project. Does not overwrite existing
files.
@return null
Adds the starter file to a new project . Does not overwrite existing files .