/**
  * @param InputInterface $input
  * @param OutputInterface $output
  * @return int
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     parent::execute($input, $output);
     $latitude = $input->getArgument('latitude');
     $longitude = $input->getArgument('longitude');
     $client = $this->getPostCodeApi();
     try {
         $address = $client->getAddressByLatitudeAndLongitude($latitude, $longitude);
         $output->writeln("<info>address found:\n" . $address . "</info>");
     } catch (\Exception $e) {
         $output->writeln('<error>Error ' . $e->getMessage() . '</error>');
         $output->writeln('<error>' . $e->getTraceAsString() . '</error>');
         return 1;
     }
     return 0;
 }
 /**
  * @param InputInterface $input
  * @param OutputInterface $output
  * @return int
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     parent::execute($input, $output);
     $postcode = $input->getArgument('postcode');
     $houseNumber = $input->getArgument('houseNumber');
     $client = $this->getPostCodeApi();
     try {
         if ($houseNumber != '') {
             $address = $client->getAddressByPostalcodeAndHouseNumber($postcode, $houseNumber);
         } else {
             $address = $client->getAddressByPostalcode($postcode);
         }
         $output->writeln("<info>address found:\n" . $address . "</info>");
     } catch (\Exception $e) {
         $output->writeln('<error>Error ' . $e->getMessage() . '</error>');
         $output->writeln('<error>' . $e->getTraceAsString() . '</error>');
         return 1;
     }
     return 0;
 }