php cs fixes after updating php cs fixer

This commit is contained in:
2024-01-10 10:31:25 +01:00
parent 60ede58af0
commit 3c8e59e088
682 changed files with 2097 additions and 882 deletions

View File

@@ -127,7 +127,7 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte
],
'apis' => [
[
'class' => \Chill\ThirdPartyBundle\Entity\ThirdParty::class,
'class' => ThirdParty::class,
'name' => 'thirdparty',
'base_path' => '/api/1.0/thirdparty/thirdparty',
// 'base_role' => \Chill\ThirdPartyBundle\Security\Authorization\ThirdPartyVoter::SHOW,
@@ -142,11 +142,11 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte
Request::METHOD_PATCH => true,
],
'roles' => [
Request::METHOD_GET => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::SHOW,
Request::METHOD_HEAD => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::SHOW,
Request::METHOD_POST => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::CREATE,
Request::METHOD_PUT => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::CREATE,
Request::METHOD_PATCH => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::CREATE,
Request::METHOD_GET => ThirdPartyVoter::SHOW,
Request::METHOD_HEAD => ThirdPartyVoter::SHOW,
Request::METHOD_POST => ThirdPartyVoter::CREATE,
Request::METHOD_PUT => ThirdPartyVoter::CREATE,
Request::METHOD_PATCH => ThirdPartyVoter::CREATE,
],
],
],

View File

@@ -16,7 +16,9 @@ use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender;
class LabelThirdPartyHelper
{
public function __construct(private readonly ThirdPartyRender $thirdPartyRender, private readonly ThirdPartyRepository $thirdPartyRepository) {}
public function __construct(private readonly ThirdPartyRender $thirdPartyRender, private readonly ThirdPartyRepository $thirdPartyRepository)
{
}
public function getLabel(string $key, array $values, string $header): callable
{

View File

@@ -100,7 +100,7 @@ class ThirdPartyType extends AbstractType
'label' => 'thirdparty.Contact data are confidential',
]);
// Institutional ThirdParty (parent)
// Institutional ThirdParty (parent)
} else {
$builder
->add('nameCompany', TextType::class, [

View File

@@ -24,7 +24,9 @@ class PickThirdPartyTypeCategoryType extends \Symfony\Component\Form\AbstractTyp
{
private const PREFIX_TYPE = 'chill_3party.key_label.';
public function __construct(private readonly ThirdPartyCategoryRepository $thirdPartyCategoryRepository, private readonly ThirdPartyTypeManager $thirdPartyTypeManager, private readonly TranslatableStringHelper $translatableStringHelper, private readonly TranslatorInterface $translator) {}
public function __construct(private readonly ThirdPartyCategoryRepository $thirdPartyCategoryRepository, private readonly ThirdPartyTypeManager $thirdPartyTypeManager, private readonly TranslatableStringHelper $translatableStringHelper, private readonly TranslatorInterface $translator)
{
}
public function configureOptions(OptionsResolver $resolver)
{

View File

@@ -26,7 +26,9 @@ use Symfony\Component\Serializer\SerializerInterface;
*/
class PickThirdpartyDynamicType extends AbstractType
{
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer) {}
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer)
{
}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -17,7 +17,9 @@ use Symfony\Component\Security\Core\Security;
final readonly class ThirdPartyACLAwareRepository implements ThirdPartyACLAwareRepositoryInterface
{
public function __construct(private Security $security, private AuthorizationHelper $authorizationHelper, private ThirdPartyRepository $thirdPartyRepository) {}
public function __construct(private Security $security, private AuthorizationHelper $authorizationHelper, private ThirdPartyRepository $thirdPartyRepository)
{
}
public function buildQuery(string $filterString = null): QueryBuilder
{

View File

@@ -44,14 +44,18 @@ FROM rows, searches
*/
class ThirdPartyApiSearch implements SearchApiInterface
{
public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository) {}
public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository)
{
}
public function getResult(string $key, array $metadata, float $pertinence)
{
return $this->thirdPartyRepository->find($metadata['id']);
}
public function prepare(array $metadatas): void {}
public function prepare(array $metadatas): void
{
}
public function provideQuery(string $pattern, array $parameters): SearchApiQuery
{

View File

@@ -24,7 +24,9 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf
{
use NormalizerAwareTrait;
public function __construct(private readonly ThirdPartyRender $thirdPartyRender, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
public function __construct(private readonly ThirdPartyRender $thirdPartyRender, private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}
public function normalize($thirdParty, $format = null, array $context = [])
{

View File

@@ -23,7 +23,9 @@ class ThirdPartyRender implements ChillEntityRenderInterface
{
use BoxUtilsChillEntityRenderTrait;
public function __construct(protected \Twig\Environment $engine, protected TranslatableStringHelper $translatableStringHelper) {}
public function __construct(protected \Twig\Environment $engine, protected TranslatableStringHelper $translatableStringHelper)
{
}
public function renderBox($entity, array $options): string
{