apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -11,12 +11,10 @@ declare(strict_types=1);
namespace Chill\ThirdPartyBundle\Templating\Entity;
use Chill\MainBundle\Templating\Entity\AbstractChillEntityRender;
use Chill\MainBundle\Templating\Entity\BoxUtilsChillEntityRenderTrait;
use Chill\MainBundle\Templating\Entity\ChillEntityRenderInterface;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Symfony\Component\Templating\EngineInterface;
/**
* @implements ChillEntityRenderInterface<ThirdParty>
@@ -44,33 +42,33 @@ class ThirdPartyRender implements ChillEntityRenderInterface
];
return
$this->getDefaultOpeningBox('thirdparty') .
$this->getDefaultOpeningBox('thirdparty').
$this->engine->render('@ChillThirdParty/Entity/thirdparty.html.twig', [
'thirdparty' => $entity,
'render' => $options['render'] ?? 'raw',
'options' => $params,
]) .
]).
$this->getDefaultClosingBox();
}
public function renderString($entity, array $options): string
{
if ($entity->getCivility() !== null) {
if (null !== $entity->getCivility()) {
$civility = $this->translatableStringHelper
->localize($entity->getCivility()->getAbbreviation()) . ' ';
->localize($entity->getCivility()->getAbbreviation()).' ';
} else {
$civility = '';
}
if ('' !== (string) $entity->getAcronym()) {
$acronym = ' (' . $entity->getAcronym() . ')';
$acronym = ' ('.$entity->getAcronym().')';
} else {
$acronym = '';
}
$firstname = ('' === $entity->getFirstname()) ? '' : $entity->getFirstname();
return $civility . $firstname . ' ' . $entity->getName() . $acronym;
return $civility.$firstname.' '.$entity->getName().$acronym;
}
public function supports($entity, array $options): bool