diff --git a/src/Parser/ConfsTech/ConferenceParser.php b/src/Parser/ConfsTech/ConferenceParser.php index 203a345..0117ad8 100644 --- a/src/Parser/ConfsTech/ConferenceParser.php +++ b/src/Parser/ConfsTech/ConferenceParser.php @@ -32,11 +32,15 @@ public function __construct( public function __invoke(array $conference) : Cfp { $cfp = new Cfp(); - $cfp->location = $conference['city']; + if (isset($conference['city'])) { + $cfp->location = $conference['city']; + } - $geolocation = $this->geolocation->getLocationForAddress( - $conference['country'] . ', ' . $cfp->location - ); + if (isset($conference['country'])) { + $geolocation = $this->geolocation->getLocationForAddress( + $conference['country'] . ', ' . $cfp->location + ); + } $cfp->latitude = $geolocation->getLatitude(); $cfp->longitude = $geolocation->getLongitude(); diff --git a/src/Writer/NullOutput.php b/src/Writer/NullOutput.php index abee643..ba9677d 100644 --- a/src/Writer/NullOutput.php +++ b/src/Writer/NullOutput.php @@ -38,7 +38,7 @@ class NullOutput implements OutputInterface * * @return bool true if verbosity is set to VERBOSITY_DEBUG, false otherwise */ - public function isDebug() + public function isDebug(): bool { return false; } @@ -60,7 +60,7 @@ public function setFormatter(OutputFormatterInterface $formatter) * * @return bool true if verbosity is set to VERBOSITY_VERBOSE, false otherwise */ - public function isVerbose() + public function isVerbose(): bool { return false; } @@ -70,7 +70,7 @@ public function isVerbose() * * @return bool true if verbosity is set to VERBOSITY_VERY_VERBOSE, false otherwise */ - public function isVeryVerbose() + public function isVeryVerbose(): bool { return false; } @@ -125,7 +125,7 @@ public function setVerbosity($level) * @return int The current level of verbosity (one of the VERBOSITY constants) * @api */ - public function getVerbosity() + public function getVerbosity(): int { return 0; } @@ -148,7 +148,7 @@ public function setDecorated($decorated) * @return bool true if the output will decorate messages, false otherwise * @api */ - public function isDecorated() + public function isDecorated(): bool { return 0; } @@ -156,10 +156,9 @@ public function isDecorated() /** * Returns current output formatter instance. * - * @return OutputFormatterInterface * @api */ - public function getFormatter() + public function getFormatter(): OutputFormatterInterface { // TODO: Implement getFormatter() method. } @@ -169,7 +168,7 @@ public function getFormatter() * * @return bool true if verbosity is set to VERBOSITY_QUIET, false otherwise */ - public function isQuiet() + public function isQuiet(): bool { // TODO: Implement isQuiet() method. }