Skip to content

Commit

Permalink
style: cs-fixer update (#6568)
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka authored Aug 31, 2024
1 parent e2eeb6b commit 50d2ca8
Show file tree
Hide file tree
Showing 48 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion src/Action/EntrypointAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct(
private readonly ResourceNameCollectionFactoryInterface $resourceNameCollectionFactory,
private readonly ?ProviderInterface $provider = null,
private readonly ?ProcessorInterface $processor = null,
private readonly array $documentationFormats = []
private readonly array $documentationFormats = [],
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Doctrine/Common/CollectionPaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ final class CollectionPaginator implements \IteratorAggregate, PaginatorInterfac
public function __construct(
readonly ReadableCollection $collection,
private readonly float $currentPage,
private readonly float $itemsPerPage
private readonly float $itemsPerPage,
) {
$this->items = $collection->slice((int) (($currentPage - 1) * $itemsPerPage), $itemsPerPage > 0 ? (int) $itemsPerPage : null);
$this->totalItems = $collection->count();
Expand Down
2 changes: 1 addition & 1 deletion src/Doctrine/Common/SelectablePaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class SelectablePaginator implements \IteratorAggregate, PaginatorInterfac
public function __construct(
readonly Selectable $selectable,
private readonly float $currentPage,
private readonly float $itemsPerPage
private readonly float $itemsPerPage,
) {
$this->totalItems = $this->selectable instanceof \Countable ? $this->selectable->count() : $this->selectable->matching(Criteria::create())->count();

Expand Down
2 changes: 1 addition & 1 deletion src/Doctrine/Common/SelectablePartialPaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ final class SelectablePartialPaginator implements \IteratorAggregate, PartialPag
public function __construct(
readonly Selectable $selectable,
private readonly float $currentPage,
private readonly float $itemsPerPage
private readonly float $itemsPerPage,
) {
$criteria = Criteria::create()
->setFirstResult((int) (($currentPage - 1) * $itemsPerPage))
Expand Down
2 changes: 1 addition & 1 deletion src/Documentation/Action/DocumentationAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function __construct(
private readonly ?ProviderInterface $provider = null,
private readonly ?ProcessorInterface $processor = null,
?Negotiator $negotiator = null,
private readonly array $documentationFormats = [OpenApiNormalizer::JSON_FORMAT => ['application/vnd.openapi+json'], OpenApiNormalizer::FORMAT => ['application/json']]
private readonly array $documentationFormats = [OpenApiNormalizer::JSON_FORMAT => ['application/vnd.openapi+json'], OpenApiNormalizer::FORMAT => ['application/json']],
) {
$this->negotiator = $negotiator ?? new Negotiator();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Documentation/Action/EntrypointAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(
private readonly ResourceNameCollectionFactoryInterface $resourceNameCollectionFactory,
private readonly ProviderInterface $provider,
private readonly ProcessorInterface $processor,
private readonly array $documentationFormats = []
private readonly array $documentationFormats = [],
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/GraphQl/Action/EntrypointAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct(
private readonly bool $graphiqlEnabled = false,
private readonly bool $graphQlPlaygroundEnabled = false,
private readonly ?string $defaultIde = null,
?Negotiator $negotiator = null
?Negotiator $negotiator = null,
) {
$this->debug = $debug ? DebugFlag::INCLUDE_DEBUG_MESSAGE | DebugFlag::INCLUDE_TRACE : DebugFlag::NONE;
$this->negotiator = $negotiator ?? new Negotiator();
Expand Down
2 changes: 1 addition & 1 deletion src/GraphQl/Resolver/Factory/ResolverFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ResolverFactory implements ResolverFactoryInterface
{
public function __construct(
private readonly ProviderInterface $provider,
private readonly ProcessorInterface $processor
private readonly ProcessorInterface $processor,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/JsonLd/Action/ContextAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(
private readonly ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory,
private readonly ?ProviderInterface $provider = null,
private readonly ?ProcessorInterface $processor = null,
private readonly ?SerializerInterface $serializer = null
private readonly ?SerializerInterface $serializer = null,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/JsonSchema/Tests/Fixtures/NotAResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(
/**
* @Groups("contain_non_resource")
*/
private $bar
private $bar,
) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class NotAResourceWithUnionIntersectTypes
public function __construct(
private $ignoredProperty,
private string|int|float|null $unionType,
private Serializable&DummyResourceInterface $intersectType
private Serializable&DummyResourceInterface $intersectType,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/ErrorResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function __construct(
$provider = null,
$processor = null,
?OptionsInterface $stateOptions = null,
array $extraProperties = []
array $extraProperties = [],
) {
parent::__construct(
uriTemplate: $uriTemplate,
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/GraphQl/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function __construct(
?OptionsInterface $stateOptions = null,
array|Parameters|null $parameters = null,
?bool $queryParameterValidationEnabled = null,
array $extraProperties = []
array $extraProperties = [],
) {
parent::__construct(
shortName: $shortName,
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function __construct(
*/
array|Parameters|null $parameters = null,
protected ?bool $queryParameterValidationEnabled = null,
protected array $extraProperties = []
protected array $extraProperties = [],
) {
if (\is_array($parameters) && $parameters) {
$parameters = new Parameters($parameters);
Expand Down
2 changes: 1 addition & 1 deletion src/Metadata/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function __construct(
?OptionsInterface $stateOptions = null,
array|Parameters|null $parameters = null,
array $extraProperties = [],
private ?string $itemUriTemplate = null
private ?string $itemUriTemplate = null,
) {
parent::__construct(
method: 'POST',
Expand Down
2 changes: 1 addition & 1 deletion src/State/ApiResource/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function __construct(
private ?string $instance = null,
private string $type = 'about:blank',
private array $headers = [],
?\Throwable $previous = null
?\Throwable $previous = null,
) {
parent::__construct($title, $status, $previous);

Expand Down
2 changes: 1 addition & 1 deletion src/State/Provider/DeserializeProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(
private readonly ?ProviderInterface $decorated,
private readonly SerializerInterface $serializer,
private readonly LegacySerializerContextBuilderInterface|SerializerContextBuilderInterface $serializerContextBuilder,
private ?TranslatorInterface $translator = null
private ?TranslatorInterface $translator = null,
) {
if (null === $this->translator) {
$this->translator = new class implements TranslatorInterface, LocaleAwareInterface {
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Action/DocumentationAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct(
private readonly ?ProviderInterface $provider = null,
private readonly ?ProcessorInterface $processor = null,
?Negotiator $negotiator = null,
private readonly array $documentationFormats = [OpenApiNormalizer::JSON_FORMAT => ['application/vnd.openapi+json'], OpenApiNormalizer::FORMAT => ['application/json']]
private readonly array $documentationFormats = [OpenApiNormalizer::JSON_FORMAT => ['application/vnd.openapi+json'], OpenApiNormalizer::FORMAT => ['application/json']],
) {
$this->negotiator = $negotiator ?? new Negotiator();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Action/EntrypointAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __construct(
private readonly ResourceNameCollectionFactoryInterface $resourceNameCollectionFactory,
private readonly ProviderInterface $provider,
private readonly ProcessorInterface $processor,
private readonly array $documentationFormats = []
private readonly array $documentationFormats = [],
) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class PayloadArgumentResolver implements CompatibleValueResolverInterface

public function __construct(
ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory,
private readonly SerializerContextBuilderInterface $serializationContextBuilder
private readonly SerializerContextBuilderInterface $serializationContextBuilder,
) {
$this->resourceMetadataCollectionFactory = $resourceMetadataCollectionFactory;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Controller/MainController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function __construct(
private readonly ProviderInterface $provider,
private readonly ProcessorInterface $processor,
?UriVariablesConverterInterface $uriVariablesConverter = null,
private readonly ?LoggerInterface $logger = null
private readonly ?LoggerInterface $logger = null,
) {
$this->resourceMetadataCollectionFactory = $resourceMetadataCollectionFactory;
$this->uriVariablesConverter = $uriVariablesConverter;
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/EventListener/AddLinkHeaderListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ final class AddLinkHeaderListener
public function __construct(
private readonly Discovery $discovery,
?ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory = null,
private readonly HttpHeaderSerializer $serializer = new HttpHeaderSerializer()
private readonly HttpHeaderSerializer $serializer = new HttpHeaderSerializer(),
) {
$this->resourceMetadataCollectionFactory = $resourceMetadataCollectionFactory;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/EventListener/DeserializeListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(
ProviderInterface|SerializerInterface $serializer,
private readonly LegacySerializerContextBuilderInterface|SerializerContextBuilderInterface|ResourceMetadataCollectionFactoryInterface|null $serializerContextBuilder = null,
?ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory = null,
private ?TranslatorInterface $translator = null
private ?TranslatorInterface $translator = null,
) {
if ($serializer instanceof ProviderInterface) {
$this->provider = $serializer;
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/EventListener/ErrorListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private function getFormatOperation(?string $format): string
'jsonld' => '_api_errors_hydra',
'jsonapi' => '_api_errors_jsonapi',
'html' => '_api_errors_problem', // This will be intercepted by the SwaggerUiProvider
default => '_api_errors_problem'
default => '_api_errors_problem',
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Security/State/LinkAccessCheckerProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ final class LinkAccessCheckerProvider implements ProviderInterface
{
public function __construct(
private readonly ProviderInterface $decorated,
private readonly ResourceAccessCheckerInterface $resourceAccessChecker
private readonly ResourceAccessCheckerInterface $resourceAccessChecker,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Security/State/LinkedReadProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class LinkedReadProvider implements ProviderInterface
public function __construct(
private readonly ProviderInterface $decorated,
private readonly ProviderInterface $locator,
private readonly ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory
private readonly ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory,
) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private function getValidationGroups(ValidatorClassMetadataInterface $classMetad
*/
private function getPropertyConstraints(
ValidatorPropertyMetadataInterface $validatorPropertyMetadata,
array $groups
array $groups,
): array {
$constraints = [];

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Validator/State/ParameterValidatorProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ final class ParameterValidatorProvider implements ProviderInterface

public function __construct(
private readonly ValidatorInterface $validator,
private readonly ProviderInterface $decorated
private readonly ProviderInterface $decorated,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Action/ExceptionActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function testActionWithOperationExceptionToStatus(
array $globalExceptionToStatus,
?array $resourceExceptionToStatus,
?array $operationExceptionToStatus,
int $expectedStatusCode
int $expectedStatusCode,
): void {
$exception = new \DomainException();
$flattenException = FlattenException::create($exception);
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/NotAResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct(
#[Groups('contain_non_resource')]
private $foo,
#[Groups('contain_non_resource')]
private $bar
private $bar,
) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct(
#[ApiProperty(genId: false)]
public readonly DummyNonResource $notResourceObject,
/** @var array<DummyNonResource> */
public readonly array $arrayOfNotResourceObjects
public readonly array $arrayOfNotResourceObjects,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/TestBundle/ApiResource/Issue5452/Author.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Author implements ActivableInterface, TimestampableInterface
public function __construct(
#[ApiProperty(identifier: true)]
public readonly string|int $id,
public readonly string $name
public readonly string $name,
) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Library implements ActivableInterface, TimestampableInterface
public function __construct(
#[ApiProperty(identifier: true)]
public readonly string|int $id,
public readonly string $name
public readonly string $name,
) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(
#[ORM\Id]
#[ORM\Column(type: 'integer')]
#[ORM\GeneratedValue(strategy: 'AUTO')]
public readonly ?int $id = null
public readonly ?int $id = null,
) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ final class SubresourceCategory
public function __construct(
#[ApiProperty(identifier: true)]
public ?int $id = null,
public ?string $name = null
public ?string $name = null,
) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CompositePrimitiveItem

public function __construct(
#[ODM\Field(type: 'string')] private string $name,
#[ODM\Field(type: 'int')] private int $year
#[ODM\Field(type: 'int')] private int $year,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/TestBundle/Document/DummyBoolean.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DummyBoolean
private ?int $id = null;

public function __construct(
#[ODM\Field(type: 'bool', nullable: true)] private bool $isDummyBoolean
#[ODM\Field(type: 'bool', nullable: true)] private bool $isDummyBoolean,
) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DummyEntityWithConstructor
public function __construct(
#[ODM\Field] private string $foo,
#[ODM\Field] private string $bar,
private array $items
private array $items,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/TestBundle/Document/VoDummyDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class VoDummyDriver

public function __construct(
#[Groups(['car_read', 'car_write'])] #[ODM\Field] private string $firstName,
#[Groups(['car_read', 'car_write'])] #[ODM\Field] private string $lastName
#[Groups(['car_read', 'car_write'])] #[ODM\Field] private string $lastName,
) {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class VoDummyInsuranceCompany
use VoDummyIdAwareTrait;

public function __construct(
#[Groups(['car_read', 'car_write'])] #[ODM\Field] private string $name
#[Groups(['car_read', 'car_write'])] #[ODM\Field] private string $name,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/TestBundle/Document/VoDummyVehicle.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ abstract class VoDummyVehicle
public function __construct(
#[Groups(['car_read', 'car_write'])] #[ODM\Field] private string $make,
#[Groups(['car_read', 'car_write'])] #[ODM\ReferenceOne(targetDocument: VoDummyInsuranceCompany::class, cascade: ['persist'])] private VoDummyInsuranceCompany $insuranceCompany,
array $drivers
array $drivers,
) {
$this->drivers = new ArrayCollection($drivers);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/TestBundle/Document/VoidPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class VoidPayment
private ?int $id = null;

public function __construct(
#[ODM\ReferenceOne(targetDocument: Payment::class, inversedBy: 'voidPayment')] private Payment $payment
#[ODM\ReferenceOne(targetDocument: Payment::class, inversedBy: 'voidPayment')] private Payment $payment,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Fixtures/TestBundle/Dto/DummyNonResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class DummyNonResource
{
public function __construct(
public ?string $foo = null,
public ?string $bar = null
public ?string $bar = null,
) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class RelationGroupImpactOnCollectionRelation
public function __construct(
public ?int $id = null,
#[Groups('related')]
public ?string $title = null
public ?string $title = null,
) {
}
}
Loading

0 comments on commit 50d2ca8

Please sign in to comment.