mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-28 09:34:59 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -12,8 +12,6 @@ declare(strict_types=1);
|
||||
namespace Chill\PersonBundle\Command;
|
||||
|
||||
use Chill\PersonBundle\Service\AccompanyingPeriod\OldDraftAccompanyingPeriodRemoverInterface;
|
||||
use DateInterval;
|
||||
use Exception;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
@@ -36,21 +34,21 @@ class RemoveOldDraftAccompanyingPeriodCommand extends Command
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$this->logger->info('[' . $this->getName() . '] started', [
|
||||
$this->logger->info('['.$this->getName().'] started', [
|
||||
'interval' => $input->getArgument('interval'),
|
||||
]);
|
||||
|
||||
try {
|
||||
$interval = new DateInterval($input->getArgument('interval'));
|
||||
} catch (Exception $e) {
|
||||
$this->logger->error('[' . $this->getName() . '] bad interval');
|
||||
$interval = new \DateInterval($input->getArgument('interval'));
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error('['.$this->getName().'] bad interval');
|
||||
|
||||
throw $e;
|
||||
}
|
||||
|
||||
$this->remover->remove($interval);
|
||||
|
||||
$this->logger->info('[' . $this->getName() . '] end of command');
|
||||
$this->logger->info('['.$this->getName().'] end of command');
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user