update cs after php-cs-fixer upgrade

This commit is contained in:
2024-09-12 12:02:33 +02:00
parent 5d0b531820
commit f0f651edea
286 changed files with 374 additions and 374 deletions

View File

@@ -140,7 +140,7 @@ final readonly class TempUrlOpenstackGenerator implements TempUrlGeneratorInterf
{
return match (str_ends_with($this->base_url, '/')) {
true => $this->base_url.$relative_path,
false => $this->base_url.'/'.$relative_path
false => $this->base_url.'/'.$relative_path,
};
}

View File

@@ -16,7 +16,7 @@ interface TempUrlGeneratorInterface
public function generatePost(
?int $expire_delay = null,
?int $submit_delay = null,
int $max_file_count = 1
int $max_file_count = 1,
): SignedUrlPost;
public function generate(string $method, string $object_name, ?int $expire_delay = null): SignedUrl;

View File

@@ -25,7 +25,7 @@ class AsyncUploadExtension extends AbstractExtension
{
public function __construct(
private readonly TempUrlGeneratorInterface $tempUrlGenerator,
private readonly UrlGeneratorInterface $routingUrlGenerator
private readonly UrlGeneratorInterface $routingUrlGenerator,
) {}
public function getFilters()

View File

@@ -35,7 +35,7 @@ class DocumentAccompanyingCourseController extends AbstractController
protected TranslatorInterface $translator,
protected EventDispatcherInterface $eventDispatcher,
protected AuthorizationHelper $authorizationHelper,
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
) {}
#[Route(path: '/{id}/delete', name: 'chill_docstore_accompanying_course_document_delete')]

View File

@@ -40,7 +40,7 @@ class DocumentPersonController extends AbstractController
protected TranslatorInterface $translator,
protected EventDispatcherInterface $eventDispatcher,
protected AuthorizationHelper $authorizationHelper,
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
) {}
#[Route(path: '/{id}/delete', name: 'chill_docstore_person_document_delete')]

View File

@@ -42,7 +42,7 @@ class DocumentCategory
*/
#[ORM\Id]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, name: 'id_inside_bundle')]
private $idInsideBundle
private $idInsideBundle,
) {}
public function getBundleId() // ::class BundleClass (FQDN)

View File

@@ -99,7 +99,7 @@ class StoredObject implements Document, TrackCreationInterface
*/
public function __construct(
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, options: ['default' => 'ready'])]
private string $status = 'ready'
private string $status = 'ready',
) {
$this->uuid = Uuid::uuid4();
}

View File

@@ -27,7 +27,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
final class AccompanyingCourseDocumentType extends AbstractType
{
public function __construct(
private readonly TranslatableStringHelperInterface $translatableStringHelper
private readonly TranslatableStringHelperInterface $translatableStringHelper,
) {}
public function buildForm(FormBuilderInterface $builder, array $options)

View File

@@ -20,7 +20,7 @@ use Symfony\Component\Serializer\SerializerInterface;
class StoredObjectDataTransformer implements DataTransformerInterface
{
public function __construct(
private readonly SerializerInterface $serializer
private readonly SerializerInterface $serializer,
) {}
public function transform(mixed $value): mixed

View File

@@ -55,7 +55,7 @@ class AsyncUploaderType extends AbstractType
public function buildView(
FormView $view,
FormInterface $form,
array $options
array $options,
) {
$view->vars['attr']['data-async-file-upload'] = true;
$view->vars['attr']['data-generate-temp-url-post'] = $this

View File

@@ -20,7 +20,7 @@ interface GenericDocForAccompanyingPeriodProviderInterface
?\DateTimeImmutable $startDate = null,
?\DateTimeImmutable $endDate = null,
?string $content = null,
?string $origin = null
?string $origin = null,
): FetchQueryInterface;
/**

View File

@@ -20,7 +20,7 @@ interface GenericDocForPersonProviderInterface
?\DateTimeImmutable $startDate = null,
?\DateTimeImmutable $endDate = null,
?string $content = null,
?string $origin = null
?string $origin = null,
): FetchQueryInterface;
/**

View File

@@ -46,7 +46,7 @@ final readonly class Manager
?\DateTimeImmutable $startDate = null,
?\DateTimeImmutable $endDate = null,
?string $content = null,
array $places = []
array $places = [],
): int {
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($accompanyingPeriod, $startDate, $endDate, $content, $places);
@@ -76,7 +76,7 @@ final readonly class Manager
?\DateTimeImmutable $startDate = null,
?\DateTimeImmutable $endDate = null,
?string $content = null,
array $places = []
array $places = [],
): int {
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($person, $startDate, $endDate, $content, $places);
@@ -97,7 +97,7 @@ final readonly class Manager
?\DateTimeImmutable $startDate = null,
?\DateTimeImmutable $endDate = null,
?string $content = null,
array $places = []
array $places = [],
): iterable {
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($accompanyingPeriod, $startDate, $endDate, $content, $places);
@@ -140,7 +140,7 @@ final readonly class Manager
?\DateTimeImmutable $startDate = null,
?\DateTimeImmutable $endDate = null,
?string $content = null,
array $places = []
array $places = [],
): iterable {
['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($person, $startDate, $endDate, $content, $places);

View File

@@ -34,7 +34,7 @@ final readonly class PersonDocumentGenericDocProvider implements GenericDocForPe
?\DateTimeImmutable $startDate = null,
?\DateTimeImmutable $endDate = null,
?string $content = null,
?string $origin = null
?string $origin = null,
): FetchQueryInterface {
return $this->personDocumentACLAwareRepository->buildFetchQueryForPerson(
$person,

View File

@@ -31,13 +31,13 @@ interface PersonDocumentACLAwareRepositoryInterface
Person $person,
?\DateTimeImmutable $startDate = null,
?\DateTimeImmutable $endDate = null,
?string $content = null
?string $content = null,
): FetchQueryInterface;
public function buildFetchQueryForAccompanyingPeriod(
AccompanyingPeriod $period,
?\DateTimeImmutable $startDate = null,
?\DateTimeImmutable $endDate = null,
?string $content = null
?string $content = null,
): FetchQueryInterface;
}

View File

@@ -24,7 +24,7 @@ readonly class PersonDocumentRepository implements ObjectRepository
private EntityRepository $repository;
public function __construct(
private EntityManagerInterface $entityManager
private EntityManagerInterface $entityManager,
) {
$this->repository = $this->entityManager->getRepository($this->getClassName());
}

View File

@@ -40,7 +40,7 @@ class AccompanyingCourseDocumentVoter extends AbstractChillVoter implements Prov
public function __construct(
protected LoggerInterface $logger,
protected Security $security,
VoterHelperFactoryInterface $voterHelperFactory
VoterHelperFactoryInterface $voterHelperFactory,
) {
$this->voterHelper = $voterHelperFactory
->generate(self::class)

View File

@@ -40,7 +40,7 @@ class PersonDocumentVoter extends AbstractChillVoter implements ProvideRoleHiera
public function __construct(
protected LoggerInterface $logger,
protected Security $security,
VoterHelperFactoryInterface $voterHelperFactory
VoterHelperFactoryInterface $voterHelperFactory,
) {
$this->voterHelper = $voterHelperFactory
->generate(self::class)

View File

@@ -49,7 +49,7 @@ class StoredObjectVoter extends Voter
return match ($askedRole) {
StoredObjectRoleEnum::SEE => StoredObjectRoleEnum::EDIT === $tokenRoleAuthorization || StoredObjectRoleEnum::SEE === $tokenRoleAuthorization,
StoredObjectRoleEnum::EDIT => StoredObjectRoleEnum::EDIT === $tokenRoleAuthorization
StoredObjectRoleEnum::EDIT => StoredObjectRoleEnum::EDIT === $tokenRoleAuthorization,
};
}
}

View File

@@ -43,7 +43,7 @@ class DavTokenAuthenticationEventSubscriber implements EventSubscriberInterface
$token->setAttribute(self::ACTIONS, match ($payload['e']) {
0 => StoredObjectRoleEnum::SEE,
1 => StoredObjectRoleEnum::EDIT,
default => throw new \UnexpectedValueException('unsupported value for e parameter')
default => throw new \UnexpectedValueException('unsupported value for e parameter'),
});
$token->setAttribute(self::STORED_OBJECT, $payload['so']);

View File

@@ -32,7 +32,7 @@ final class StoredObjectNormalizer implements NormalizerInterface, NormalizerAwa
public function __construct(
private readonly JWTDavTokenProviderInterface $JWTDavTokenProvider,
private readonly UrlGeneratorInterface $urlGenerator
private readonly UrlGeneratorInterface $urlGenerator,
) {}
public function normalize($object, ?string $format = null, array $context = [])

View File

@@ -29,7 +29,7 @@ final class StoredObjectManager implements StoredObjectManagerInterface
public function __construct(
private readonly HttpClientInterface $client,
private readonly TempUrlGeneratorInterface $tempUrlGenerator
private readonly TempUrlGeneratorInterface $tempUrlGenerator,
) {}
public function getLastModified(StoredObject $document): \DateTimeInterface

View File

@@ -94,7 +94,7 @@ class PersonDocumentACLAwareRepositoryTest extends KernelTestCase
AccompanyingPeriod $period,
?\DateTimeImmutable $startDate = null,
?\DateTimeImmutable $endDate = null,
?string $content = null
?string $content = null,
): void {
$centerManager = $this->prophesize(CenterResolverManagerInterface::class);
$centerManager->resolveCenters(Argument::type(Person::class))

View File

@@ -27,7 +27,7 @@ final class AsyncFileExistsValidator extends ConstraintValidator
{
public function __construct(
private readonly TempUrlGeneratorInterface $tempUrlGenerator,
private readonly HttpClientInterface $client
private readonly HttpClientInterface $client,
) {}
public function validate($value, Constraint $constraint): void

View File

@@ -29,7 +29,7 @@ class AccompanyingCourseDocumentWorkflowHandler implements EntityWorkflowHandler
*/
public function __construct(
EntityManagerInterface $em,
private readonly TranslatorInterface $translator
private readonly TranslatorInterface $translator,
) {
$this->repository = $em->getRepository(AccompanyingCourseDocument::class);
}