mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-28 13:06:13 +00:00
refactor: rename class providing AccompanyingCourseDocument Generic doc
This commit is contained in:
parent
40ddd1f1ee
commit
da36c59616
@ -21,7 +21,7 @@ use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
final readonly class AccompanyingProviderCourseDocumentGenericDoc implements GenericDocForAccompanyingPeriodProviderInterface
|
||||
final readonly class AccompanyingCourseDocumentGenericDocProvider implements GenericDocForAccompanyingPeriodProviderInterface
|
||||
{
|
||||
public const KEY = 'accompanying_course_document';
|
||||
|
@ -14,7 +14,7 @@ namespace Chill\DocStoreBundle\GenericDoc\Renderer;
|
||||
use Chill\DocStoreBundle\GenericDoc\GenericDocDTO;
|
||||
use Chill\DocStoreBundle\GenericDoc\Providers\PersonDocumentGenericDocProvider;
|
||||
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\PersonDocumentRepository;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
@ -29,7 +29,7 @@ final readonly class AccompanyingCourseDocumentGenericDocRenderer implements Gen
|
||||
|
||||
public function supports(GenericDocDTO $genericDocDTO, $options = []): bool
|
||||
{
|
||||
return $genericDocDTO->key === AccompanyingProviderCourseDocumentGenericDoc::KEY
|
||||
return $genericDocDTO->key === AccompanyingCourseDocumentGenericDocProvider::KEY
|
||||
|| $genericDocDTO->key === PersonDocumentGenericDocProvider::KEY;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\DocStoreBundle\Tests\GenericDoc\Providers;
|
||||
|
||||
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\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
@ -25,7 +25,7 @@ use Symfony\Component\Security\Core\Security;
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class AccompanyingCourseDocumentProviderTest extends KernelTestCase
|
||||
class AccompanyingCourseDocumentGenericDocProviderTest extends KernelTestCase
|
||||
{
|
||||
use ProphecyTrait;
|
||||
private EntityManagerInterface $entityManager;
|
||||
@ -54,7 +54,7 @@ class AccompanyingCourseDocumentProviderTest extends KernelTestCase
|
||||
$security->isGranted(AccompanyingCourseDocumentVoter::SEE, $period)
|
||||
->willReturn(true);
|
||||
|
||||
$provider = new AccompanyingProviderCourseDocumentGenericDoc(
|
||||
$provider = new AccompanyingCourseDocumentGenericDocProvider(
|
||||
$security->reveal(),
|
||||
$this->entityManager
|
||||
);
|
Loading…
x
Reference in New Issue
Block a user