fix addrank and add user group error

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

No files matched your search

+2 -2
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'
);
+2 -2
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'
);