Skip to content

Commit

Permalink
[update] php cs fixer to 3.60 (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukadschaak committed Aug 6, 2024
1 parent 7eea357 commit 4da36d2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"require-dev": {
"ergebnis/composer-normalize": "^2.42",
"friendsofphp/php-cs-fixer": "^3.11",
"friendsofphp/php-cs-fixer": "^3.60",
"jangregor/phpstan-prophecy": "^1.0",
"matthiasnoback/symfony-dependency-injection-test": "^5.1",
"nyholm/symfony-bundle-test": "^3.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Converter/StrategicConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public function convert(object $source, ?object $ctx = null): object
if (\array_key_exists($selectedConverterKey, $this->converters)) {
return $this->converters[$selectedConverterKey]->convert($source, $ctx);
}
throw new ConverterException(sprintf('No converter found for key <%s>', $selectedConverterKey));
throw new ConverterException(\sprintf('No converter found for key <%s>', $selectedConverterKey));
}
}
2 changes: 1 addition & 1 deletion src/DependencyInjection/NeustaConverterExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private function registerPopulatorConfiguration(string $id, array $config, Conta
'$sourceArrayItemPropertyName' => $sourceProperty['source_array_item'] ?? null,
'$accessor' => new Reference('property_accessor'),
],
default => throw new InvalidConfigurationException(sprintf('The populator "%s" is not supported.', $config['populator'])),
default => throw new InvalidConfigurationException(\sprintf('The populator "%s" is not supported.', $config['populator'])),
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/Exception/PopulationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class PopulationException extends \Exception
public function __construct(string $sourcePropertyName, string $targetPropertyName, \Throwable $previous)
{
parent::__construct(
sprintf('Population Exception (%s -> %s): %s',
\sprintf('Population Exception (%s -> %s): %s',
$sourcePropertyName,
$targetPropertyName,
$previous->getMessage(),
Expand Down
6 changes: 3 additions & 3 deletions src/Target/GenericTargetFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public function __construct(string $type)
$this->type = new \ReflectionClass($type);

if (!$this->type->isInstantiable()) {
throw new \InvalidArgumentException(sprintf('Target class "%s" is not instantiable.', $type));
throw new \InvalidArgumentException(\sprintf('Target class "%s" is not instantiable.', $type));
}

if ($this->type->getConstructor()?->getNumberOfRequiredParameters()) {
throw new \InvalidArgumentException(sprintf('Target class "%s" has required constructor parameters.', $type));
throw new \InvalidArgumentException(\sprintf('Target class "%s" has required constructor parameters.', $type));
}
}

Expand All @@ -43,7 +43,7 @@ public function create(?object $ctx = null): object
try {
return $this->type->newInstance();
} catch (\ReflectionException $e) {
throw new \LogicException(sprintf('Cannot create new instance of "%s" because: %s', $this->type->getName(), $e->getMessage()), 0, $e);
throw new \LogicException(\sprintf('Cannot create new instance of "%s" because: %s', $this->type->getName(), $e->getMessage()), 0, $e);
}
}
}
2 changes: 1 addition & 1 deletion tests/DependencyInjection/NeustaConverterExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ protected function assertContainerBuilderHasPublicService(string $serviceId, ?st
$this->assertContainerBuilderHasService($serviceId, $expectedClass);
$this->assertTrue(
$this->container->getDefinition('foobar')->isPublic(),
sprintf('service definition "%s" is "public"', $serviceId),
\sprintf('service definition "%s" is "public"', $serviceId),
);
}
}

0 comments on commit 4da36d2

Please sign in to comment.