private function putContentToFile(string $file, string $content, string $key): void
    {
        if ($this->hasOption('overwrite') || ! \file_exists($file)) {
            \file_put_contents($file, $content);
        } else {
            if ($this->hasOption('merge')) {
                $confirmed = true;
            } else {
                $confirmed = $this->confirm(\sprintf('Do you really wish to overwrite %s', $key));
            }

            if ($confirmed) {
                \file_put_contents($file, $content);
            }
        }
    }
private function putContentToFile(string $file, string $content, string $key): void
    {
        if ($this->hasOption('overwrite') || ! \file_exists($file)) {
            \file_put_contents($file, $content);
        } else {
            if ($this->hasOption('merge')) {
                $confirmed = true;
            } else {
                $confirmed = $this->confirm(\sprintf('Do you really wish to overwrite %s', $key));
            }

            if ($confirmed) {
                \file_put_contents($file, $content);
            }
        }
    }
private function putContentToFile ( string $ file , string $ content , string $ key ) : void { if ( $ this -> hasOption ( 'overwrite' ) || ! \ file_exists ( $ file ) ) { \ file_put_contents ( $ file , $ content ) ; } else { if ( $ this -> hasOption ( 'merge' ) ) { $ confirmed = true ; } else { $ confirmed = $ this -> confirm ( \ sprintf ( 'Do you really wish to overwrite %s' , $ key ) ) ; } if ( $ confirmed ) { \ file_put_contents ( $ file , $ content ) ; } } }
Put the created content to file.

@param string $file
@param string $content
@param string $key

@return void
Put the created content to file .