Fixed all possible PHPStan errors

This commit is contained in:
Alejandro Celaya
2017-12-27 16:23:54 +01:00
parent 4f3995ea80
commit db956a1f40
21 changed files with 67 additions and 68 deletions

View File

@@ -71,14 +71,6 @@ class ResolveUrlCommand extends Command
try {
$longUrl = $this->urlShortener->shortCodeToUrl($shortCode);
if (! isset($longUrl)) {
$output->writeln(sprintf(
'<error>' . $this->translator->translate('No URL found for short code "%s"') . '</error>',
$shortCode
));
return;
}
$output->writeln(sprintf('%s <info>%s</info>', $this->translator->translate('Long URL:'), $longUrl));
} catch (InvalidShortCodeException $e) {
$output->writeln(sprintf('<error>' . $this->translator->translate(