Skip to content

Commit

Permalink
OP-321: ECS auto fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jkindly committed Jun 25, 2024
1 parent 789ba2a commit e1b93db
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/Entity/BlockContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@

final class BlockContent implements BlockContentInterface
{
protected ?int $id;
private ?int $id;

Check failure on line 15 in src/Entity/BlockContent.php

View workflow job for this annotation

GitHub Actions / Sylius ~1.13.0, PHP 8.1, Symfony ^5.4

Property BitBag\SyliusCmsPlugin\Entity\BlockContent::$id is never written, only read.

Check failure on line 15 in src/Entity/BlockContent.php

View workflow job for this annotation

GitHub Actions / Sylius ~1.13.0, PHP 8.1, Symfony ^6.4

Property BitBag\SyliusCmsPlugin\Entity\BlockContent::$id is never written, only read.

protected ?string $type;
private ?string $type;

protected array $configuration = [];
private array $configuration = [];

protected ?BlockInterface $block = null;
private ?BlockInterface $block = null;

public function getId(): ?int
{
Expand Down
1 change: 0 additions & 1 deletion src/Entity/LocaleAwareInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career
*/


declare(strict_types=1);

namespace BitBag\SyliusCmsPlugin\Entity;
Expand Down
1 change: 0 additions & 1 deletion src/Entity/LocaleAwareTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career
*/


declare(strict_types=1);

namespace BitBag\SyliusCmsPlugin\Entity;
Expand Down
4 changes: 2 additions & 2 deletions src/Form/Type/BlockContentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
$form = $event->getForm();
$formData = $form->getData();

if ($formData !== null && $formData->getType() !== $data['type']) {
if (null !== $formData && $formData->getType() !== $data['type']) {
$formData->setConfiguration([]);
}

Expand All @@ -77,7 +77,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
private function addConfigurationTypeToForm(FormEvent $event): void
{
$data = $event->getData();
if ($data === null) {
if (null === $data) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/BlockType.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
use Sylius\Bundle\ChannelBundle\Form\Type\ChannelChoiceType;
use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;

final class BlockType extends AbstractResourceType
{
Expand Down
1 change: 0 additions & 1 deletion src/Importer/BlockImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use BitBag\SyliusCmsPlugin\Repository\BlockRepositoryInterface;
use BitBag\SyliusCmsPlugin\Resolver\ImporterChannelsResolverInterface;
use BitBag\SyliusCmsPlugin\Resolver\ImporterCollectionsResolverInterface;
use BitBag\SyliusCmsPlugin\Resolver\ImporterProductsResolverInterface;
use BitBag\SyliusCmsPlugin\Resolver\ResourceResolverInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use Webmozart\Assert\Assert;
Expand Down
1 change: 0 additions & 1 deletion src/Repository/BlockRepositoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace BitBag\SyliusCmsPlugin\Repository;

use BitBag\SyliusCmsPlugin\Entity\BlockInterface;
use Doctrine\ORM\QueryBuilder;
use Sylius\Component\Resource\Repository\RepositoryInterface;

interface BlockRepositoryInterface extends RepositoryInterface
Expand Down

0 comments on commit e1b93db

Please sign in to comment.