Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)

This commit is contained in:
Kevin Papst
2022-12-31 21:19:55 +01:00
committed by GitHub
parent 95e06746bd
commit 90a0fd8a22
2164 changed files with 83700 additions and 86426 deletions

View File

@@ -20,18 +20,12 @@ use Symfony\Component\Console\Style\SymfonyStyle;
abstract class AbstractRoleCommand extends Command
{
private $userService;
public function __construct(UserService $userService)
public function __construct(private UserService $userService)
{
parent::__construct();
$this->userService = $userService;
}
/**
* {@inheritdoc}
*/
protected function configure()
protected function configure(): void
{
$this
->setDefinition([
@@ -41,10 +35,7 @@ abstract class AbstractRoleCommand extends Command
]);
}
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$username = $input->getArgument('username');
$role = $input->getArgument('role');
@@ -62,7 +53,7 @@ abstract class AbstractRoleCommand extends Command
$this->executeRoleCommand($this->userService, new SymfonyStyle($input, $output), $user, $super, $role);
return 0;
return Command::SUCCESS;
}
abstract protected function executeRoleCommand(UserService $manipulator, SymfonyStyle $output, User $user, bool $super, $role);