Skip to content

Commit

Permalink
OP-320: PR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jkindly committed Jun 25, 2024
1 parent d997864 commit 5431c2e
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions spec/Assigner/CollectionsAssignerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions spec/Resolver/ImporterCollectionsResolverSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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'];
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/Assigner/CollectionsAssigner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions src/Assigner/CollectionsAssignerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion src/Entity/BlockInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface BlockInterface extends
ToggleableInterface,
ProductsAwareInterface,
TaxonAwareInterface,
CollectionableInterface,
CollectibleInterface,
ChannelsAwareInterface,
ContentableInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

use Doctrine\Common\Collections\Collection;

interface BlockableInterface
interface BlocksCollectionInterface
{
public function initializeBlocksCollection(): void;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;

trait BlockableTrait
trait BlocksCollectionTrait
{
protected Collection $blocks;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

use Doctrine\Common\Collections\Collection;

interface CollectionableInterface
interface CollectibleInterface
{
public function initializeCollectionsCollection(): void;

Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class Collection implements CollectionInterface
{
use PagesCollectionTrait;
use BlockableTrait;
use BlocksCollectionTrait;
use MediaCollectionTrait;
use TranslatableTrait {
__construct as private initializeTranslationsCollection;
Expand Down
4 changes: 2 additions & 2 deletions src/Entity/CollectionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ interface CollectionInterface extends
ResourceInterface,
TranslatableInterface,
PagesCollectionInterface,
BlockableInterface,
MediableInterface
BlocksCollectionInterface,
MediaCollectionInterface
{
public function getCode(): ?string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

use Doctrine\Common\Collections\Collection;

interface MediableInterface
interface MediaCollectionInterface
{
public function initializeMediaCollection(): void;

Expand Down
2 changes: 1 addition & 1 deletion src/Entity/MediaInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface MediaInterface extends
TranslatableInterface,
ToggleableInterface,
ProductsAwareInterface,
CollectionableInterface,
CollectibleInterface,
ChannelsAwareInterface,
ContentableInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/PageInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface PageInterface extends
TranslatableInterface,
ToggleableInterface,
ProductsAwareInterface,
CollectionableInterface,
CollectibleInterface,
TimestampableInterface,
ChannelsAwareInterface,
ContentableInterface,
Expand Down
4 changes: 2 additions & 2 deletions src/Resolver/ImporterCollectionsResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
namespace BitBag\SyliusCmsPlugin\Resolver;

use BitBag\SyliusCmsPlugin\Assigner\CollectionsAssignerInterface;
use BitBag\SyliusCmsPlugin\Entity\CollectionableInterface;
use BitBag\SyliusCmsPlugin\Entity\CollectibleInterface;

final class ImporterCollectionsResolver implements ImporterCollectionsResolverInterface
{
public function __construct(private CollectionsAssignerInterface $collectionsAssigner)
{
}

public function resolve(CollectionableInterface $collectionable, ?string $collectionsRow): void
public function resolve(CollectibleInterface $collectionable, ?string $collectionsRow): void
{
if (null === $collectionsRow) {
return;
Expand Down
4 changes: 2 additions & 2 deletions src/Resolver/ImporterCollectionsResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 5431c2e

Please sign in to comment.