diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2020-05-27 04:27:45 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2020-05-27 04:27:45 +0300 |
commit | 82c2964bb8893973bbeab037afd67aff9fefd51d (patch) | |
tree | c9b6a37ef277ecc7b40f57054664eea2aa916953 /libraries/classes/Command | |
parent | 2d02a15de37f2552e5974975d1216cbf1ae1ff85 (diff) |
Remove useless elses
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'libraries/classes/Command')
-rw-r--r-- | libraries/classes/Command/CacheWarmupCommand.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libraries/classes/Command/CacheWarmupCommand.php b/libraries/classes/Command/CacheWarmupCommand.php index c39773e864..b326a9399f 100644 --- a/libraries/classes/Command/CacheWarmupCommand.php +++ b/libraries/classes/Command/CacheWarmupCommand.php @@ -57,24 +57,24 @@ final class CacheWarmupCommand extends Command return $this->warmUpTwigCache($output); } elseif ($input->getOption('routing') === true) { return $this->warmUpRoutingCache($output); - } else { - $output->writeln('Warming up all caches.', OutputInterface::VERBOSITY_VERBOSE); - $twigCode = $this->warmUptwigCache($output); - if ($twigCode !== 0) { - $output->writeln('Twig cache generation had an error.'); + } - return $twigCode; - } - $routingCode = $this->warmUpTwigCache($output); - if ($routingCode !== 0) { - $output->writeln('Routing cache generation had an error.'); + $output->writeln('Warming up all caches.', OutputInterface::VERBOSITY_VERBOSE); + $twigCode = $this->warmUptwigCache($output); + if ($twigCode !== 0) { + $output->writeln('Twig cache generation had an error.'); - return $twigCode; - } - $output->writeln('Warm up of all caches done.', OutputInterface::VERBOSITY_VERBOSE); + return $twigCode; + } + $routingCode = $this->warmUpTwigCache($output); + if ($routingCode !== 0) { + $output->writeln('Routing cache generation had an error.'); - return 0; + return $twigCode; } + $output->writeln('Warm up of all caches done.', OutputInterface::VERBOSITY_VERBOSE); + + return 0; } private function warmUpRoutingCache(OutputInterface $output): int |