Command/InstallCityStatePostalCodeDataCommand.php
protected function execute(InputInterface $input, OutputInterface $output)
    {
        try {
            /** @var CityStatePostalCodeModel $model */
            $model = $this->getContainer()->get('mautic.enhancer.model.citystatepostalcode');
            if ($model->updateReferenceTable()) {
                $output->writeln('Reference data successfully loaded. CityStateFromPostalCode is ready for use.');

                return true;
            }
        } catch (\Exception $e) {
            $output->write('CityStatePostalCode: '.$e->getMessage());
        }
        $output->writeln('Failed to load reference table. CityStateFromPostalCode is not ready.');

        return false;
    }
protected function execute(InputInterface $input, OutputInterface $output)
    {
        try {
            /** @var CityStatePostalCodeModel $model */
            $model = $this->getContainer()->get('mautic.enhancer.model.citystatepostalcode');
            if ($model->updateReferenceTable()) {
                $output->writeln('Reference data successfully loaded. CityStateFromPostalCode is ready for use.');

                return true;
            }
        } catch (\Exception $e) {
            $output->write('CityStatePostalCode: '.$e->getMessage());
        }
        $output->writeln('Failed to load reference table. CityStateFromPostalCode is not ready.');

        return false;
    }
@param InputInterface  $input
@param OutputInterface $output

@return bool