mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-06 04:44:19 +01:00
Change namespace to Tvdt
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repository;
|
||||
namespace Tvdt\Repository;
|
||||
|
||||
use App\Entity\Answer;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Tvdt\Entity\Answer;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Answer>
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repository;
|
||||
namespace Tvdt\Repository;
|
||||
|
||||
use App\Entity\Candidate;
|
||||
use App\Entity\Quiz;
|
||||
use App\Entity\Season;
|
||||
use App\Helpers\Base64;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Safe\Exceptions\UrlException;
|
||||
use Symfony\Component\Uid\Uuid;
|
||||
use Tvdt\Entity\Candidate;
|
||||
use Tvdt\Entity\Quiz;
|
||||
use Tvdt\Entity\Season;
|
||||
use Tvdt\Helpers\Base64;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Candidate>
|
||||
@@ -35,7 +35,7 @@ class CandidateRepository extends ServiceEntityRepository
|
||||
}
|
||||
|
||||
return $this->getEntityManager()->createQuery(<<<DQL
|
||||
select c from App\Entity\Candidate c
|
||||
select c from Tvdt\Entity\Candidate c
|
||||
where c.season = :season
|
||||
and lower(c.name) = lower(:name)
|
||||
DQL
|
||||
@@ -64,7 +64,7 @@ class CandidateRepository extends ServiceEntityRepository
|
||||
qc.corrections,
|
||||
max(ga.created) - qc.created as time,
|
||||
(sum(case when a.isRightAnswer = true then 1 else 0 end) + qc.corrections) as score
|
||||
from App\Entity\Candidate c
|
||||
from Tvdt\Entity\Candidate c
|
||||
join c.givenAnswers ga
|
||||
join ga.answer a
|
||||
join c.quizData qc
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repository;
|
||||
namespace Tvdt\Repository;
|
||||
|
||||
use App\Entity\Elimination;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Tvdt\Entity\Elimination;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Elimination>
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repository;
|
||||
namespace Tvdt\Repository;
|
||||
|
||||
use App\Entity\GivenAnswer;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Tvdt\Entity\GivenAnswer;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<GivenAnswer>
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repository;
|
||||
namespace Tvdt\Repository;
|
||||
|
||||
use App\Entity\Candidate;
|
||||
use App\Entity\Question;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Tvdt\Entity\Candidate;
|
||||
use Tvdt\Entity\Question;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Question>
|
||||
@@ -22,10 +22,10 @@ class QuestionRepository extends ServiceEntityRepository
|
||||
public function findNextQuestionForCandidate(Candidate $candidate): ?Question
|
||||
{
|
||||
return $this->getEntityManager()->createQuery(<<<DQL
|
||||
select q from App\Entity\Question q
|
||||
select q from Tvdt\Entity\Question q
|
||||
join q.quiz qz
|
||||
where q.id not in (
|
||||
select q1.id from App\Entity\GivenAnswer ga
|
||||
select q1.id from Tvdt\Entity\GivenAnswer ga
|
||||
join ga.answer a
|
||||
join a.question q1
|
||||
where ga.candidate = :candidate
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repository;
|
||||
namespace Tvdt\Repository;
|
||||
|
||||
use App\Entity\Candidate;
|
||||
use App\Entity\Quiz;
|
||||
use App\Entity\QuizCandidate;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Tvdt\Entity\Candidate;
|
||||
use Tvdt\Entity\Quiz;
|
||||
use Tvdt\Entity\QuizCandidate;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<QuizCandidate>
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repository;
|
||||
namespace Tvdt\Repository;
|
||||
|
||||
use App\Entity\Elimination;
|
||||
use App\Entity\GivenAnswer;
|
||||
use App\Entity\Quiz;
|
||||
use App\Entity\QuizCandidate;
|
||||
use App\Exception\ErrorClearingQuizException;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Tvdt\Entity\Elimination;
|
||||
use Tvdt\Entity\GivenAnswer;
|
||||
use Tvdt\Entity\Quiz;
|
||||
use Tvdt\Entity\QuizCandidate;
|
||||
use Tvdt\Exception\ErrorClearingQuizException;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Quiz>
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repository;
|
||||
namespace Tvdt\Repository;
|
||||
|
||||
use App\Entity\Season;
|
||||
use App\Entity\User;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Tvdt\Entity\Season;
|
||||
use Tvdt\Entity\User;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Season>
|
||||
@@ -23,7 +23,7 @@ class SeasonRepository extends ServiceEntityRepository
|
||||
public function getSeasonsForUser(User $user): array
|
||||
{
|
||||
return $this->getEntityManager()->createQuery(<<<DQL
|
||||
select s from App\Entity\Season s where :user member of s.owners order by s.name
|
||||
select s from Tvdt\Entity\Season s where :user member of s.owners order by s.name
|
||||
DQL
|
||||
)->setParameter('user', $user)->getResult();
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repository;
|
||||
namespace Tvdt\Repository;
|
||||
|
||||
use App\Entity\SeasonSettings;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Tvdt\Entity\SeasonSettings;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<SeasonSettings>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Repository;
|
||||
namespace Tvdt\Repository;
|
||||
|
||||
use App\Entity\User;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
||||
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
|
||||
use Tvdt\Entity\User;
|
||||
|
||||
/** @extends ServiceEntityRepository<User> */
|
||||
class UserRepository extends ServiceEntityRepository implements PasswordUpgraderInterface
|
||||
|
||||
Reference in New Issue
Block a user