Skip to content

Commit ee19940

Browse files
committed
style: cs fixes
1 parent e0ed41f commit ee19940

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

src/Elasticsearch/Metadata/Resource/Factory/ElasticsearchProviderResourceMetadataCollectionFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class ElasticsearchProviderResourceMetadataCollectionFactory implements Re
3030
public function __construct(private readonly ?Client $client, private readonly ResourceMetadataCollectionFactoryInterface $decorated, private readonly bool $triggerDeprecation = true, private readonly ?InflectorInterface $inflector = null) // @phpstan-ignore-line
3131
{
3232
if ($client) {
33-
trigger_deprecation('api-platform/core', '4.0', sprintf('Using $client at "%s" is deprecated and the argument will be removed.', self::class));
33+
trigger_deprecation('api-platform/core', '4.0', \sprintf('Using $client at "%s" is deprecated and the argument will be removed.', self::class));
3434
}
3535
}
3636

src/GraphQl/Subscription/SubscriptionManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ final class SubscriptionManager implements OperationAwareSubscriptionManagerInte
4141
public function __construct(private readonly CacheItemPoolInterface $subscriptionsCache, private readonly SubscriptionIdentifierGeneratorInterface $subscriptionIdentifierGenerator, private readonly SerializeStageInterface|ProcessorInterface|null $serializeStage = null, private readonly ?IriConverterInterface $iriConverter = null, private readonly ?ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory = null)
4242
{
4343
if (!$serializeStage instanceof ProcessorInterface) {
44-
trigger_deprecation('api-platform/core', '4.0', sprintf('Using an instanceof "%s" is deprecated, use "%s" instead.', SerializeStageInterface::class, ProcessorInterface::class));
44+
trigger_deprecation('api-platform/core', '4.0', \sprintf('Using an instanceof "%s" is deprecated, use "%s" instead.', SerializeStageInterface::class, ProcessorInterface::class));
4545
}
4646
}
4747

src/JsonSchema/SchemaFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ final class SchemaFactory implements SchemaFactoryInterface, SchemaFactoryAwareI
4242
public function __construct(?TypeFactoryInterface $typeFactory, ResourceMetadataCollectionFactoryInterface $resourceMetadataFactory, private readonly PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, private readonly PropertyMetadataFactoryInterface $propertyMetadataFactory, private readonly ?NameConverterInterface $nameConverter = null, ?ResourceClassResolverInterface $resourceClassResolver = null, private readonly ?array $distinctFormats = null, private ?DefinitionNameFactoryInterface $definitionNameFactory = null)
4343
{
4444
if ($typeFactory) {
45-
trigger_deprecation('api-platform/core', '3.4', sprintf('Injecting the "%s" inside "%s" is deprecated and "%s" will be removed in 4.x.', TypeFactoryInterface::class, self::class, TypeFactoryInterface::class));
45+
trigger_deprecation('api-platform/core', '3.4', \sprintf('Injecting the "%s" inside "%s" is deprecated and "%s" will be removed in 4.x.', TypeFactoryInterface::class, self::class, TypeFactoryInterface::class));
4646
$this->typeFactory = $typeFactory;
4747
}
4848
if (!$definitionNameFactory) {

src/Metadata/Resource/Factory/ParameterResourceMetadataCollectionFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ private function addFilterValidation(HttpOperation $operation): Parameters
254254

255255
$openApi = null;
256256
if (isset($definition['openapi'])) {
257-
trigger_deprecation('api-platform/core', '3.4', sprintf('The key "openapi" in a filter description should be a "%s" class or use "schema" to specify the JSON Schema.', OpenApiParameter::class));
257+
trigger_deprecation('api-platform/core', '3.4', \sprintf('The key "openapi" in a filter description should be a "%s" class or use "schema" to specify the JSON Schema.', OpenApiParameter::class));
258258
if ($definition['openapi'] instanceof OpenApiParameter) {
259259
$openApi = $definition['openapi'];
260260
} else {

src/Metadata/Util/IriHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static function parseIri(string $iri, string $pageParameterName): array
3939
{
4040
$parts = parse_url($iri);
4141
if (false === $parts) {
42-
throw new InvalidArgumentException(sprintf('The request URI "%s" is malformed.', $iri));
42+
throw new InvalidArgumentException(\sprintf('The request URI "%s" is malformed.', $iri));
4343
}
4444

4545
$parameters = [];

src/OpenApi/Factory/OpenApiFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function __construct(private readonly ResourceNameCollectionFactoryInterf
8282
$this->paginationOptions = $paginationOptions ?: new PaginationOptions();
8383

8484
if ($jsonSchemaTypeFactory) {
85-
trigger_deprecation('api-platform/core', '3.4', sprintf('Injecting the "%s" inside "%s" is deprecated and "%s" will be removed in 4.x.', TypeFactoryInterface::class, self::class, TypeFactoryInterface::class));
85+
trigger_deprecation('api-platform/core', '3.4', \sprintf('Injecting the "%s" inside "%s" is deprecated and "%s" will be removed in 4.x.', TypeFactoryInterface::class, self::class, TypeFactoryInterface::class));
8686
$this->jsonSchemaTypeFactory = $jsonSchemaTypeFactory;
8787
}
8888
}
@@ -646,7 +646,7 @@ private function getFiltersParameters(CollectionOperationInterface|HttpOperation
646646

647647
foreach ($filter->getDescription($entityClass) as $name => $data) {
648648
if (isset($data['swagger'])) {
649-
trigger_deprecation('api-platform/core', '4.0', sprintf('Using the "swagger" field of the %s::getDescription() (%s) is deprecated.', $filter::class, $operation->getShortName()));
649+
trigger_deprecation('api-platform/core', '4.0', \sprintf('Using the "swagger" field of the %s::getDescription() (%s) is deprecated.', $filter::class, $operation->getShortName()));
650650
}
651651

652652
if (!isset($data['openapi']) || $data['openapi'] instanceof Parameter) {
@@ -680,7 +680,7 @@ private function getFiltersParameters(CollectionOperationInterface|HttpOperation
680680
continue;
681681
}
682682

683-
trigger_deprecation('api-platform/core', '4.0', sprintf('Not using "%s" on the "openapi" field of the %s::getDescription() (%s) is deprecated.', Parameter::class, $filter::class, $operation->getShortName()));
683+
trigger_deprecation('api-platform/core', '4.0', \sprintf('Not using "%s" on the "openapi" field of the %s::getDescription() (%s) is deprecated.', Parameter::class, $filter::class, $operation->getShortName()));
684684
if ($this->jsonSchemaTypeFactory) {
685685
$schema = $data['schema'] ?? (\in_array($data['type'], Type::$builtinTypes, true) ? $this->jsonSchemaTypeFactory->getType(new Type($data['type'], false, null, $data['is_collection'] ?? false), 'openapi') : ['type' => 'string']);
686686
} else {

tests/Functional/Parameters/SecurityTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function testSecurityHeaderValues(string $parameterValue, int $expectedSt
6464
/** @dataProvider dataSecurityValues */
6565
public function testSecurityQueryValues(string $parameterValue, int $expectedStatusCode): void
6666
{
67-
self::createClient()->request('GET', sprintf('with_security_parameters_collection?secret=%s', $parameterValue));
67+
self::createClient()->request('GET', \sprintf('with_security_parameters_collection?secret=%s', $parameterValue));
6868
$this->assertResponseStatusCodeSame($expectedStatusCode);
6969
}
7070
}

0 commit comments

Comments
 (0)