Skip to content

Commit

Permalink
Ignore some PHPStan issues
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Jul 1, 2023
1 parent 8f25a8a commit 3aa107b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@
'blank_line_between_import_groups' => false,
'no_trailing_comma_in_singleline' => false,
'nullable_type_declaration_for_default_null_value' => true,
'phpdoc_to_comment' => false,
))
;
3 changes: 3 additions & 0 deletions src/Field/Configurator/ChoiceConfigurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use EasyCorp\Bundle\EasyAdminBundle\Translation\TranslatableChoiceMessageCollection;
use function Symfony\Component\String\u;
use function Symfony\Component\Translation\t;
use Symfony\Component\Translation\TranslatableMessage;
use Symfony\Contracts\Translation\TranslatableInterface;

/**
Expand Down Expand Up @@ -120,6 +121,8 @@ public function configure(FieldDto $field, EntityDto $entityDto, AdminContext $c
$translationDomain
);
}

/** @var TranslatableMessage $choiceMessage */
$choiceMessages[] = new TranslatableChoiceMessage(
$choiceMessage,
$isRenderedAsBadge ? $this->getBadgeCssClass($badgeSelector, $selectedValue, $field) : null
Expand Down
2 changes: 1 addition & 1 deletion src/Translation/TranslatableMessageBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TranslatableMessageBuilder
*/
public static function withParameters(TranslatableInterface $translatable, array $parameters): TranslatableInterface
{
if (TranslatableMessage::class !== $translatable::class) {
if (!($translatable instanceof TranslatableMessage)) {
return $translatable;
}

Expand Down

0 comments on commit 3aa107b

Please sign in to comment.