Updated to phpstan 0.11

This commit is contained in:
Alejandro Celaya
2019-02-17 10:06:27 +01:00
parent eab5659163
commit 580050cb7d
19 changed files with 59 additions and 31 deletions

View File

@@ -3,6 +3,7 @@ declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Command\Visit;
use Shlinkio\Shlink\CLI\Util\ExitCodes;
use Shlinkio\Shlink\Common\Exception\WrongIpException;
use Shlinkio\Shlink\Common\IpGeolocation\IpLocationResolverInterface;
use Shlinkio\Shlink\Common\Util\IpAddress;
@@ -56,7 +57,7 @@ class ProcessVisitsCommand extends Command
$lock = $this->locker->createLock(self::NAME);
if (! $lock->acquire()) {
$io->warning(sprintf('There is already an instance of the "%s" command in execution', self::NAME));
return 1;
return ExitCodes::EXIT_WARNING;
}
try {
@@ -70,7 +71,7 @@ class ProcessVisitsCommand extends Command
$io->success('Finished processing all IPs');
} finally {
$lock->release();
return 0;
return ExitCodes::EXIT_SUCCESS;
}
}