apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -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;
}