fix addrank and add user group error

This commit is contained in:
Xbird
2022-09-24 19:29:07 +02:00
parent 18f1b38a19
commit ce6a82d33e
2 changed files with 4 additions and 4 deletions

View File

@@ -44,7 +44,7 @@ class AddRankCommand extends Command
/**
* @var GroupRepository $groupRepository
*/
$groupRepository = $this->entityManager->getRepository("App:Group");
$groupRepository = $this->entityManager->getRepository(Group::class);
if ($groupid && null === $groupRepository->find($groupid)) {
$groupid = '';
@@ -64,7 +64,7 @@ class AddRankCommand extends Command
);
}
global $groupRepository;
if (null === $this->entityManager->getRepository("App:Group")->find($answer)) {
if (null === $this->entityManager->getRepository(Group::class)->find($answer)) {
throw new \RuntimeException(
'No group find for this id'
);

View File

@@ -103,7 +103,7 @@ class AddUserCommand extends Command
/**
* @var GroupRepository $groupRepository
*/
$groupRepository = $this->entityManager->getRepository("App:Group");
$groupRepository = $this->entityManager->getRepository(Group::class);
if ($groupid && null === $groupRepository->find($groupid)) {
$groupid = '';
@@ -123,7 +123,7 @@ class AddUserCommand extends Command
);
}
global $groupRepository;
if (null === $this->entityManager->getRepository("App:Group")->find($answer)) {
if (null === $this->entityManager->getRepository(Group::class)->find($answer)) {
throw new \RuntimeException(
'No group find for this id'
);