mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user