From d8d74949986524732d24b748746befee40b8c315 Mon Sep 17 00:00:00 2001 From: Steven Renaux Date: Sat, 12 Oct 2024 16:18:01 +0200 Subject: [PATCH] Fix php cs-fixer --- src/Builder/DownloadFromTrait.php | 5 +++++ src/Builder/Pdf/AbstractChromiumPdfBuilder.php | 2 +- src/Builder/Screenshot/AbstractScreenshotBuilder.php | 2 -- tests/DependencyInjection/ConfigurationTest.php | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Builder/DownloadFromTrait.php b/src/Builder/DownloadFromTrait.php index e1925881..a7407bca 100644 --- a/src/Builder/DownloadFromTrait.php +++ b/src/Builder/DownloadFromTrait.php @@ -41,6 +41,11 @@ public function withDownloadFrom(array &$formFields, array $downloadFrom): stati return $this; } + /** + * @param array}> $value + * + * @return list}> + */ private function downloadFromNormalizer(array $value, callable $encoder): array { $downloadsFrom = array_values($value); diff --git a/src/Builder/Pdf/AbstractChromiumPdfBuilder.php b/src/Builder/Pdf/AbstractChromiumPdfBuilder.php index d5f2cd34..90c454b6 100644 --- a/src/Builder/Pdf/AbstractChromiumPdfBuilder.php +++ b/src/Builder/Pdf/AbstractChromiumPdfBuilder.php @@ -589,7 +589,7 @@ protected function addConfiguration(string $configurationName, mixed $value): vo 'skip_network_idle_event' => $this->skipNetworkIdleEvent($value), 'metadata' => $this->metadata($value), 'download_from' => $this->downloadFrom($value), - default => throw new InvalidBuilderConfiguration(sprintf('Invalid option "%s": no method does not exist in class "%s" to configured it.', $configurationName, static::class)), + default => throw new InvalidBuilderConfiguration(\sprintf('Invalid option "%s": no method does not exist in class "%s" to configured it.', $configurationName, static::class)), }; } } diff --git a/src/Builder/Screenshot/AbstractScreenshotBuilder.php b/src/Builder/Screenshot/AbstractScreenshotBuilder.php index 322719f0..ecfc50f5 100644 --- a/src/Builder/Screenshot/AbstractScreenshotBuilder.php +++ b/src/Builder/Screenshot/AbstractScreenshotBuilder.php @@ -5,9 +5,7 @@ use Sensiolabs\GotenbergBundle\Builder\DefaultBuilderTrait; use Sensiolabs\GotenbergBundle\Builder\DownloadFromTrait; use Sensiolabs\GotenbergBundle\Client\GotenbergClientInterface; -use Sensiolabs\GotenbergBundle\Enumeration\Part; use Sensiolabs\GotenbergBundle\Formatter\AssetBaseDirFormatter; -use Symfony\Component\Mime\Part\DataPart; abstract class AbstractScreenshotBuilder implements ScreenshotBuilderInterface { diff --git a/tests/DependencyInjection/ConfigurationTest.php b/tests/DependencyInjection/ConfigurationTest.php index 44610fe1..79cc05b1 100644 --- a/tests/DependencyInjection/ConfigurationTest.php +++ b/tests/DependencyInjection/ConfigurationTest.php @@ -86,7 +86,7 @@ public function testWithDownloadFromConfiguration(): void { $processor = new Processor(); /** @var array{'default_options': array} $config */ - $config = $processor->processConfiguration(new Configuration(), [ + $config = $processor->processConfiguration(new Configuration(), [ [ 'http_client' => 'http_client', 'default_options' => [