refactor: rename class providing AccompanyingCourseDocument Generic doc

This commit is contained in:
Julien Fastré 2023-05-30 21:52:36 +02:00
parent 40ddd1f1ee
commit da36c59616
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
3 changed files with 6 additions and 6 deletions

View File

@ -21,7 +21,7 @@ use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Security\Core\Security; use Symfony\Component\Security\Core\Security;
final readonly class AccompanyingProviderCourseDocumentGenericDoc implements GenericDocForAccompanyingPeriodProviderInterface final readonly class AccompanyingCourseDocumentGenericDocProvider implements GenericDocForAccompanyingPeriodProviderInterface
{ {
public const KEY = 'accompanying_course_document'; public const KEY = 'accompanying_course_document';

View File

@ -14,7 +14,7 @@ namespace Chill\DocStoreBundle\GenericDoc\Renderer;
use Chill\DocStoreBundle\GenericDoc\GenericDocDTO; use Chill\DocStoreBundle\GenericDoc\GenericDocDTO;
use Chill\DocStoreBundle\GenericDoc\Providers\PersonDocumentGenericDocProvider; use Chill\DocStoreBundle\GenericDoc\Providers\PersonDocumentGenericDocProvider;
use Chill\DocStoreBundle\GenericDoc\Twig\GenericDocRendererInterface; use Chill\DocStoreBundle\GenericDoc\Twig\GenericDocRendererInterface;
use Chill\DocStoreBundle\GenericDoc\Providers\AccompanyingProviderCourseDocumentGenericDoc; use Chill\DocStoreBundle\GenericDoc\Providers\AccompanyingCourseDocumentGenericDocProvider;
use Chill\DocStoreBundle\Repository\AccompanyingCourseDocumentRepository; use Chill\DocStoreBundle\Repository\AccompanyingCourseDocumentRepository;
use Chill\DocStoreBundle\Repository\PersonDocumentRepository; use Chill\DocStoreBundle\Repository\PersonDocumentRepository;
use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod;
@ -29,7 +29,7 @@ final readonly class AccompanyingCourseDocumentGenericDocRenderer implements Gen
public function supports(GenericDocDTO $genericDocDTO, $options = []): bool public function supports(GenericDocDTO $genericDocDTO, $options = []): bool
{ {
return $genericDocDTO->key === AccompanyingProviderCourseDocumentGenericDoc::KEY return $genericDocDTO->key === AccompanyingCourseDocumentGenericDocProvider::KEY
|| $genericDocDTO->key === PersonDocumentGenericDocProvider::KEY; || $genericDocDTO->key === PersonDocumentGenericDocProvider::KEY;
} }

View File

@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Chill\DocStoreBundle\Tests\GenericDoc\Providers; namespace Chill\DocStoreBundle\Tests\GenericDoc\Providers;
use Chill\DocStoreBundle\GenericDoc\FetchQueryToSqlBuilder; use Chill\DocStoreBundle\GenericDoc\FetchQueryToSqlBuilder;
use Chill\DocStoreBundle\GenericDoc\Providers\AccompanyingProviderCourseDocumentGenericDoc; use Chill\DocStoreBundle\GenericDoc\Providers\AccompanyingCourseDocumentGenericDocProvider;
use Chill\DocStoreBundle\Security\Authorization\AccompanyingCourseDocumentVoter; use Chill\DocStoreBundle\Security\Authorization\AccompanyingCourseDocumentVoter;
use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Doctrine\DBAL\Types\Types; use Doctrine\DBAL\Types\Types;
@ -25,7 +25,7 @@ use Symfony\Component\Security\Core\Security;
* @internal * @internal
* @coversNothing * @coversNothing
*/ */
class AccompanyingCourseDocumentProviderTest extends KernelTestCase class AccompanyingCourseDocumentGenericDocProviderTest extends KernelTestCase
{ {
use ProphecyTrait; use ProphecyTrait;
private EntityManagerInterface $entityManager; private EntityManagerInterface $entityManager;
@ -54,7 +54,7 @@ class AccompanyingCourseDocumentProviderTest extends KernelTestCase
$security->isGranted(AccompanyingCourseDocumentVoter::SEE, $period) $security->isGranted(AccompanyingCourseDocumentVoter::SEE, $period)
->willReturn(true); ->willReturn(true);
$provider = new AccompanyingProviderCourseDocumentGenericDoc( $provider = new AccompanyingCourseDocumentGenericDocProvider(
$security->reveal(), $security->reveal(),
$this->entityManager $this->entityManager
); );