1 <?php 
declare(strict_types
=1); 
   4  * This file is part of the Rapsys AirBundle package. 
   6  * (c) Raphaël Gertz <symfony@rapsys.eu> 
   8  * For the full copyright and license information, please view the LICENSE 
   9  * file that was distributed with this source code. 
  12 namespace Rapsys\AirBundle\Command
; 
  14 use Doctrine\Bundle\DoctrineBundle\Command\DoctrineCommand
; 
  15 use Symfony\Component\Console\Input\InputInterface
; 
  16 use Symfony\Component\Console\Output\OutputInterface
; 
  18 use Rapsys\AirBundle\Command
; 
  19 use Rapsys\AirBundle\Entity\Session
; 
  24 class RekeyCommand 
extends DoctrineCommand 
{ 
  26          * Configure attribute command 
  28         protected function configure() { 
  32                         ->setName('rapsysair:rekey') 
  33                         //Set description shown with bin/console list 
  34                         ->setDescription('Rekey sessions') 
  35                         //Set description shown with bin/console --help airlibre:attribute 
  36                         ->setHelp('This command rekey sessions in chronological order'); 
  40          * Process the attribution 
  42         protected function execute(InputInterface 
$input, OutputInterface 
$output): int { 
  44                 $doctrine = $this->getDoctrine(); 
  47                 if (!$doctrine->getRepository(Session
::class)->rekey()) {