Phpro\SoapClient\Console\Command\GenerateTypesCommand::handleExistingFile PHP Method

handleExistingFile() protected method

An existing file was found. Try to patch or ask if it can be overwritten.
protected handleExistingFile ( TypeGenerator $generator, Type $type, string $path ) : boolean
$generator Phpro\SoapClient\CodeGenerator\TypeGenerator
$type Phpro\SoapClient\CodeGenerator\Model\Type
$path string
return boolean
    protected function handleExistingFile(TypeGenerator $generator, Type $type, $path)
    {
        $this->output->write(sprintf('Type %s exists. Trying to patch ...', $type->getName()));
        $patched = $this->patchExistingFile($generator, $type, $path);
        if ($patched) {
            $this->output->writeln('Patched!');
            return true;
        }
        $this->output->writeln('Could not patch.');
        return false;
    }