diff --git a/spec/Assigner/CollectionsAssignerSpec.php b/spec/Assigner/CollectionsAssignerSpec.php index bfbfd29d0..898ad2de7 100644 --- a/spec/Assigner/CollectionsAssignerSpec.php +++ b/spec/Assigner/CollectionsAssignerSpec.php @@ -12,7 +12,7 @@ use BitBag\SyliusCmsPlugin\Assigner\CollectionsAssigner; use BitBag\SyliusCmsPlugin\Assigner\CollectionsAssignerInterface; -use BitBag\SyliusCmsPlugin\Entity\CollectionableInterface; +use BitBag\SyliusCmsPlugin\Entity\CollectibleInterface; use BitBag\SyliusCmsPlugin\Entity\CollectionInterface; use BitBag\SyliusCmsPlugin\Repository\CollectionRepositoryInterface; use PhpSpec\ObjectBehavior; @@ -38,7 +38,7 @@ public function it_assigns_collections( CollectionRepositoryInterface $collectionRepository, CollectionInterface $aboutCollection, CollectionInterface $blogCollection, - CollectionableInterface $collectionsAware + CollectibleInterface $collectionsAware ): void { $collectionRepository->findOneBy(['code' => 'about'])->willReturn($aboutCollection); diff --git a/spec/Resolver/ImporterCollectionsResolverSpec.php b/spec/Resolver/ImporterCollectionsResolverSpec.php index 7bf04650b..50568efdb 100644 --- a/spec/Resolver/ImporterCollectionsResolverSpec.php +++ b/spec/Resolver/ImporterCollectionsResolverSpec.php @@ -11,7 +11,7 @@ namespace spec\BitBag\SyliusCmsPlugin\Resolver; use BitBag\SyliusCmsPlugin\Assigner\CollectionsAssignerInterface; -use BitBag\SyliusCmsPlugin\Entity\CollectionableInterface; +use BitBag\SyliusCmsPlugin\Entity\CollectibleInterface; use BitBag\SyliusCmsPlugin\Resolver\ImporterCollectionsResolver; use PhpSpec\ObjectBehavior; use Prophecy\Argument; @@ -30,7 +30,7 @@ public function it_is_initializable() public function it_resolves_collections_for_collectionable_entity( CollectionsAssignerInterface $collectionsAssigner, - CollectionableInterface $collectionable + CollectibleInterface $collectionable ) { $collectionsRow = 'collection1, collection2, collection3'; $collectionsCodes = ['collection1', 'collection2', 'collection3']; @@ -42,7 +42,7 @@ public function it_resolves_collections_for_collectionable_entity( public function it_skips_resolution_when_collections_row_is_null( CollectionsAssignerInterface $collectionsAssigner, - CollectionableInterface $collectionable + CollectibleInterface $collectionable ) { $collectionsRow = null; diff --git a/src/Assigner/CollectionsAssigner.php b/src/Assigner/CollectionsAssigner.php index 4cb237ecd..808f4dd61 100644 --- a/src/Assigner/CollectionsAssigner.php +++ b/src/Assigner/CollectionsAssigner.php @@ -10,7 +10,7 @@ namespace BitBag\SyliusCmsPlugin\Assigner; -use BitBag\SyliusCmsPlugin\Entity\CollectionableInterface; +use BitBag\SyliusCmsPlugin\Entity\CollectibleInterface; use BitBag\SyliusCmsPlugin\Entity\CollectionInterface; use BitBag\SyliusCmsPlugin\Repository\CollectionRepositoryInterface; use Webmozart\Assert\Assert; @@ -21,7 +21,7 @@ public function __construct(private CollectionRepositoryInterface $collectionRep { } - public function assign(CollectionableInterface $collectionsAware, array $collectionsCodes): void + public function assign(CollectibleInterface $collectionsAware, array $collectionsCodes): void { foreach ($collectionsCodes as $collectionCode) { /** @var CollectionInterface|null $collection */ diff --git a/src/Assigner/CollectionsAssignerInterface.php b/src/Assigner/CollectionsAssignerInterface.php index 860b3b8d0..7ad276981 100644 --- a/src/Assigner/CollectionsAssignerInterface.php +++ b/src/Assigner/CollectionsAssignerInterface.php @@ -10,9 +10,9 @@ namespace BitBag\SyliusCmsPlugin\Assigner; -use BitBag\SyliusCmsPlugin\Entity\CollectionableInterface; +use BitBag\SyliusCmsPlugin\Entity\CollectibleInterface; interface CollectionsAssignerInterface { - public function assign(CollectionableInterface $collectionsAware, array $collectionsCodes): void; + public function assign(CollectibleInterface $collectionsAware, array $collectionsCodes): void; } diff --git a/src/Entity/BlockInterface.php b/src/Entity/BlockInterface.php index e8a9d313e..8289d2fbc 100755 --- a/src/Entity/BlockInterface.php +++ b/src/Entity/BlockInterface.php @@ -21,7 +21,7 @@ interface BlockInterface extends ToggleableInterface, ProductsAwareInterface, TaxonAwareInterface, - CollectionableInterface, + CollectibleInterface, ChannelsAwareInterface, ContentableInterface { diff --git a/src/Entity/BlockableInterface.php b/src/Entity/BlocksCollectionInterface.php similarity index 95% rename from src/Entity/BlockableInterface.php rename to src/Entity/BlocksCollectionInterface.php index 477443bbc..f6fcd828d 100644 --- a/src/Entity/BlockableInterface.php +++ b/src/Entity/BlocksCollectionInterface.php @@ -12,7 +12,7 @@ use Doctrine\Common\Collections\Collection; -interface BlockableInterface +interface BlocksCollectionInterface { public function initializeBlocksCollection(): void; diff --git a/src/Entity/BlockableTrait.php b/src/Entity/BlocksCollectionTrait.php similarity index 97% rename from src/Entity/BlockableTrait.php rename to src/Entity/BlocksCollectionTrait.php index d74cc55eb..71bf4c78b 100644 --- a/src/Entity/BlockableTrait.php +++ b/src/Entity/BlocksCollectionTrait.php @@ -13,7 +13,7 @@ use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; -trait BlockableTrait +trait BlocksCollectionTrait { protected Collection $blocks; diff --git a/src/Entity/CollectionableInterface.php b/src/Entity/CollectibleInterface.php similarity index 96% rename from src/Entity/CollectionableInterface.php rename to src/Entity/CollectibleInterface.php index 2fec26479..106ae7f0d 100755 --- a/src/Entity/CollectionableInterface.php +++ b/src/Entity/CollectibleInterface.php @@ -12,7 +12,7 @@ use Doctrine\Common\Collections\Collection; -interface CollectionableInterface +interface CollectibleInterface { public function initializeCollectionsCollection(): void; diff --git a/src/Entity/Collection.php b/src/Entity/Collection.php index 485e3d77f..d80c7b599 100755 --- a/src/Entity/Collection.php +++ b/src/Entity/Collection.php @@ -16,7 +16,7 @@ class Collection implements CollectionInterface { use PagesCollectionTrait; - use BlockableTrait; + use BlocksCollectionTrait; use MediaCollectionTrait; use TranslatableTrait { __construct as private initializeTranslationsCollection; diff --git a/src/Entity/CollectionInterface.php b/src/Entity/CollectionInterface.php index 57274d430..1eef9d2d9 100755 --- a/src/Entity/CollectionInterface.php +++ b/src/Entity/CollectionInterface.php @@ -17,8 +17,8 @@ interface CollectionInterface extends ResourceInterface, TranslatableInterface, PagesCollectionInterface, - BlockableInterface, - MediableInterface + BlocksCollectionInterface, + MediaCollectionInterface { public function getCode(): ?string; diff --git a/src/Entity/MediableInterface.php b/src/Entity/MediaCollectionInterface.php similarity index 95% rename from src/Entity/MediableInterface.php rename to src/Entity/MediaCollectionInterface.php index b4fc57f15..45c1dd98e 100644 --- a/src/Entity/MediableInterface.php +++ b/src/Entity/MediaCollectionInterface.php @@ -12,7 +12,7 @@ use Doctrine\Common\Collections\Collection; -interface MediableInterface +interface MediaCollectionInterface { public function initializeMediaCollection(): void; diff --git a/src/Entity/MediaInterface.php b/src/Entity/MediaInterface.php index c189a95d8..83478d68a 100644 --- a/src/Entity/MediaInterface.php +++ b/src/Entity/MediaInterface.php @@ -21,7 +21,7 @@ interface MediaInterface extends TranslatableInterface, ToggleableInterface, ProductsAwareInterface, - CollectionableInterface, + CollectibleInterface, ChannelsAwareInterface, ContentableInterface { diff --git a/src/Entity/PageInterface.php b/src/Entity/PageInterface.php index 23e7b38d4..b154afd76 100755 --- a/src/Entity/PageInterface.php +++ b/src/Entity/PageInterface.php @@ -22,7 +22,7 @@ interface PageInterface extends TranslatableInterface, ToggleableInterface, ProductsAwareInterface, - CollectionableInterface, + CollectibleInterface, TimestampableInterface, ChannelsAwareInterface, ContentableInterface, diff --git a/src/Resolver/ImporterCollectionsResolver.php b/src/Resolver/ImporterCollectionsResolver.php index 3f90be302..d803ecebc 100644 --- a/src/Resolver/ImporterCollectionsResolver.php +++ b/src/Resolver/ImporterCollectionsResolver.php @@ -11,7 +11,7 @@ namespace BitBag\SyliusCmsPlugin\Resolver; use BitBag\SyliusCmsPlugin\Assigner\CollectionsAssignerInterface; -use BitBag\SyliusCmsPlugin\Entity\CollectionableInterface; +use BitBag\SyliusCmsPlugin\Entity\CollectibleInterface; final class ImporterCollectionsResolver implements ImporterCollectionsResolverInterface { @@ -19,7 +19,7 @@ public function __construct(private CollectionsAssignerInterface $collectionsAss { } - public function resolve(CollectionableInterface $collectionable, ?string $collectionsRow): void + public function resolve(CollectibleInterface $collectionable, ?string $collectionsRow): void { if (null === $collectionsRow) { return; diff --git a/src/Resolver/ImporterCollectionsResolverInterface.php b/src/Resolver/ImporterCollectionsResolverInterface.php index 6484167aa..23c931e95 100644 --- a/src/Resolver/ImporterCollectionsResolverInterface.php +++ b/src/Resolver/ImporterCollectionsResolverInterface.php @@ -10,9 +10,9 @@ namespace BitBag\SyliusCmsPlugin\Resolver; -use BitBag\SyliusCmsPlugin\Entity\CollectionableInterface; +use BitBag\SyliusCmsPlugin\Entity\CollectibleInterface; interface ImporterCollectionsResolverInterface { - public function resolve(CollectionableInterface $collectionable, ?string $collectionsRow): void; + public function resolve(CollectibleInterface $collectionable, ?string $collectionsRow): void; }