Skip to content
This repository was archived by the owner on Jun 30, 2021. It is now read-only.

Commit 870074e

Browse files
committed
Code style fixes
1 parent b9449c4 commit 870074e

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

src/Commands/CacheStoreCommand.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@
2222
use Symfony\Component\Console\Input\InputInterface;
2323
use Symfony\Component\Console\Output\OutputInterface;
2424
use Symfony\Component\DependencyInjection\ContainerInterface;
25-
use Symfony\Component\Process\Process;
2625
use Trivago\Rumi\Exceptions\SkipException;
2726
use Trivago\Rumi\Models\RunConfig;
2827
use Trivago\Rumi\Services\ConfigReader;
29-
use Trivago\Rumi\Services\ConfigReaderInterface;
3028

3129
class CacheStoreCommand extends CommandAbstract
3230
{
@@ -85,16 +83,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
8583
} catch (\Exception $e) {
8684
$output->writeln('<error>' . $e->getMessage() . '</error>');
8785

88-
return $e->getCode() != 0 ? $e->getCode() : -1;
86+
return $e->getCode() !== 0 ? $e->getCode() : ReturnCodes::FAILED;
8987
}
9088

91-
return 0;
89+
return ReturnCodes::SUCCESS;
9290
}
9391

9492
/**
9593
* @param $cacheDir
96-
*
97-
* @return Process
9894
*/
9995
protected function createCacheDirectory($cacheDir)
10096
{
@@ -142,7 +138,7 @@ protected function SkipIfDestCacheDirDoesNotExist(InputInterface $input)
142138
*/
143139
protected function SkipIfNotMasterAndCacheFilled($argument, $cacheDir)
144140
{
145-
if ($argument == 'origin/master' || $argument == 'master') {
141+
if ($argument === 'origin/master' || $argument === 'master') {
146142
return;
147143
}
148144

@@ -156,7 +152,6 @@ protected function SkipIfNotMasterAndCacheFilled($argument, $cacheDir)
156152
private function getCiConfig()
157153
{
158154
try {
159-
/** @var ConfigReaderInterface $configReader */
160155
$configReader = $this->container->get('trivago.rumi.services.config_reader');
161156

162157
return $configReader->getRunConfig();

0 commit comments

Comments
 (0)