protected function deleteCountry(
        InputInterface $input,
        OutputInterface $output,
        $countryCode
    ) {
        $noInteraction = $input->getOption('no-interaction');
        $country = $this
            ->locationDirector
            ->findOneBy([
                'code' => $countryCode,
            ]);

        if ($country instanceof LocationInterface) {
            if (
                !$noInteraction &&
                !$this->confirmRemoval(
                    $input,
                    $output,
                    $countryCode,
                    $output
                )
            ) {
                return $this;
            }

            $this->dropCountry($country, $output);
        } else {
            $this
                ->printMessage(
                    $output,
                    'Geo',
                    'Country ' . $countryCode . ' not found in your database'
                );
        }

        return $this;
    }
protected function deleteCountry(
        InputInterface $input,
        OutputInterface $output,
        $countryCode
    ) {
        $noInteraction = $input->getOption('no-interaction');
        $country = $this
            ->locationDirector
            ->findOneBy([
                'code' => $countryCode,
            ]);

        if ($country instanceof LocationInterface) {
            if (
                !$noInteraction &&
                !$this->confirmRemoval(
                    $input,
                    $output,
                    $countryCode,
                    $output
                )
            ) {
                return $this;
            }

            $this->dropCountry($country, $output);
        } else {
            $this
                ->printMessage(
                    $output,
                    'Geo',
                    'Country ' . $countryCode . ' not found in your database'
                );
        }

        return $this;
    }
protected function deleteCountry ( InputInterface $ input , OutputInterface $ output , $ countryCode ) { $ noInteraction = $ input -> getOption ( 'no-interaction' ) ; $ country = $ this -> locationDirector -> findOneBy ( [ 'code' => $ countryCode , ] ) ; if ( $ country instanceof LocationInterface ) { if ( ! $ noInteraction && ! $ this -> confirmRemoval ( $ input , $ output , $ countryCode , $ output ) ) { return $ this ; } $ this -> dropCountry ( $ country , $ output ) ; } else { $ this -> printMessage ( $ output , 'Geo' , 'Country ' . $ countryCode . ' not found in your database' ) ; } return $ this ; }
Ensure deletion of a country.

@param InputInterface  $input  The input interface
@param OutputInterface $output The output interface

@return $this Self object
Ensure deletion of a country .