fix addrank and add user group error
This commit is contained in:
@@ -44,7 +44,7 @@ class AddRankCommand extends Command
|
|||||||
/**
|
/**
|
||||||
* @var GroupRepository $groupRepository
|
* @var GroupRepository $groupRepository
|
||||||
*/
|
*/
|
||||||
$groupRepository = $this->entityManager->getRepository("App:Group");
|
$groupRepository = $this->entityManager->getRepository(Group::class);
|
||||||
|
|
||||||
if ($groupid && null === $groupRepository->find($groupid)) {
|
if ($groupid && null === $groupRepository->find($groupid)) {
|
||||||
$groupid = '';
|
$groupid = '';
|
||||||
@@ -64,7 +64,7 @@ class AddRankCommand extends Command
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
global $groupRepository;
|
global $groupRepository;
|
||||||
if (null === $this->entityManager->getRepository("App:Group")->find($answer)) {
|
if (null === $this->entityManager->getRepository(Group::class)->find($answer)) {
|
||||||
throw new \RuntimeException(
|
throw new \RuntimeException(
|
||||||
'No group find for this id'
|
'No group find for this id'
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class AddUserCommand extends Command
|
|||||||
/**
|
/**
|
||||||
* @var GroupRepository $groupRepository
|
* @var GroupRepository $groupRepository
|
||||||
*/
|
*/
|
||||||
$groupRepository = $this->entityManager->getRepository("App:Group");
|
$groupRepository = $this->entityManager->getRepository(Group::class);
|
||||||
|
|
||||||
if ($groupid && null === $groupRepository->find($groupid)) {
|
if ($groupid && null === $groupRepository->find($groupid)) {
|
||||||
$groupid = '';
|
$groupid = '';
|
||||||
@@ -123,7 +123,7 @@ class AddUserCommand extends Command
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
global $groupRepository;
|
global $groupRepository;
|
||||||
if (null === $this->entityManager->getRepository("App:Group")->find($answer)) {
|
if (null === $this->entityManager->getRepository(Group::class)->find($answer)) {
|
||||||
throw new \RuntimeException(
|
throw new \RuntimeException(
|
||||||
'No group find for this id'
|
'No group find for this id'
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user