Change namespace to Tvdt

This commit is contained in:
2025-09-28 18:14:58 +02:00
parent cfb69c8dab
commit 81e471a760
98 changed files with 531 additions and 534 deletions

View File

@@ -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>

View File

@@ -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

View File

@@ -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>

View File

@@ -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>

View File

@@ -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

View File

@@ -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>

View File

@@ -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>

View File

@@ -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();
}

View File

@@ -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>

View File

@@ -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