src/Generator.php
public function write() : void
    {
        if (!$this->features) {
            return;
        }
        $i = 0;
        while (true) {
            $file = sprintf('%s/%s%s.php', $this->config->output, $this->normalize($this->objectUnderTest->getName()), $i ? ".$i" : '');
            if (!file_exists($file)) {
                break;
            }
            ++$i;
        }
        file_put_contents($file, $this->render());
    }
public function write() : void
    {
        if (!$this->features) {
            return;
        }
        $i = 0;
        while (true) {
            $file = sprintf('%s/%s%s.php', $this->config->output, $this->normalize($this->objectUnderTest->getName()), $i ? ".$i" : '');
            if (!file_exists($file)) {
                break;
            }
            ++$i;
        }
        file_put_contents($file, $this->render());
    }
public function write ( ) : void { if ( ! $ this -> features ) { return ; } $ i = 0 ; while ( true ) { $ file = sprintf ( '%s/%s%s.php' , $ this -> config -> output , $ this -> normalize ( $ this -> objectUnderTest -> getName ( ) ) , $ i ? ".$i" : '' ) ; if ( ! file_exists ( $ file ) ) { break ; } ++ $ i ; } file_put_contents ( $ file , $ this -> render ( ) ) ; }
Actually write the generated stubs to file. If a file by the name of the
feature already exists, a number is appended.

@return void
Actually write the generated stubs to file . If a file by the name of the feature already exists a number is appended .