From 38ed6d66e65da7ccf64a6a8da608f19a732fd22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <2566282+brotkrueml@users.noreply.github.com> Date: Tue, 27 Aug 2024 09:39:45 +0200 Subject: [PATCH] chore: update brotkrueml/coding-standards to 6.0.0 --- composer.json | 2 +- src/Client/IncidentsClientDecorator.php | 12 ++++++------ src/Mapper/MultipartFormDataMapper.php | 2 +- tests/Unit/Client/IncidentsClientDecoratorTest.php | 2 +- tests/Unit/Configuration/ClientConfigurationTest.php | 2 +- tests/Unit/Exception/HttpExceptionTest.php | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 02774e4..de3b7a8 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "psr/http-message": "^1.1 || ^2.0" }, "require-dev": { - "brotkrueml/coding-standards": "~5.1.0", + "brotkrueml/coding-standards": "~6.0.0", "donatj/mock-webserver": "^2.7", "ergebnis/composer-normalize": "~2.43.0", "infection/infection": "^0.29.6", diff --git a/src/Client/IncidentsClientDecorator.php b/src/Client/IncidentsClientDecorator.php index 5a69558..ae6cead 100644 --- a/src/Client/IncidentsClientDecorator.php +++ b/src/Client/IncidentsClientDecorator.php @@ -44,7 +44,7 @@ public function request(string $method, string $resource, $data = []): ResponseI private function buildMultipart(Incident $incident): array { $multipart = [ - 'step' => (string)$incident->getStep(), + 'step' => (string) $incident->getStep(), ]; if ($incident->getInitiator() !== '') { @@ -64,15 +64,15 @@ private function buildMultipart(Incident $incident): array } if ($incident->getPriority() !== Priority::Normal) { - $multipart['priority'] = (string)$incident->getPriority()->value; + $multipart['priority'] = (string) $incident->getPriority()->value; } if ($incident->getPool() > 1) { - $multipart['pool'] = (string)$incident->getPool(); + $multipart['pool'] = (string) $incident->getPool(); } if ($incident->isSimulation()) { - $multipart['simulation'] = (string)$incident->isSimulation(); + $multipart['simulation'] = (string) $incident->isSimulation(); } if ($incident->getStepEscalationDate() instanceof \DateTimeInterface) { @@ -117,10 +117,10 @@ private function buildProcessTableFieldsForMultipart(array $processTableFields): private function prepareFieldValue(bool|int|string|FileInterface $value): string|FileInterface { if (\is_bool($value)) { - $value = (int)$value; + $value = (int) $value; } - return $value instanceof FileInterface ? $value : (string)$value; + return $value instanceof FileInterface ? $value : (string) $value; } private function getProcessTableFieldKey(int $index, string $part): string diff --git a/src/Mapper/MultipartFormDataMapper.php b/src/Mapper/MultipartFormDataMapper.php index 6f4c5b4..07a574d 100644 --- a/src/Mapper/MultipartFormDataMapper.php +++ b/src/Mapper/MultipartFormDataMapper.php @@ -57,7 +57,7 @@ public function map(array $data): array // @phpstan-ignore-next-line Use value object over return of values return [ 'name' => $name, - 'contents' => (string)$value, + 'contents' => (string) $value, ]; }, \array_keys($data), \array_values($data)); } diff --git a/tests/Unit/Client/IncidentsClientDecoratorTest.php b/tests/Unit/Client/IncidentsClientDecoratorTest.php index a6a7916..3e0d373 100644 --- a/tests/Unit/Client/IncidentsClientDecoratorTest.php +++ b/tests/Unit/Client/IncidentsClientDecoratorTest.php @@ -170,7 +170,7 @@ public static function dataProvider(): iterable ], ]; - $fileStub = new class() implements FileInterface { + $fileStub = new class implements FileInterface { public function toArray(): array { return []; diff --git a/tests/Unit/Configuration/ClientConfigurationTest.php b/tests/Unit/Configuration/ClientConfigurationTest.php index 2a4c440..1afa4e6 100644 --- a/tests/Unit/Configuration/ClientConfigurationTest.php +++ b/tests/Unit/Configuration/ClientConfigurationTest.php @@ -63,7 +63,7 @@ public function getBaseUrlReturnsPreviouslySetBaseUrl(): void $actual = $this->subject->getJobRouterSystem(); $expected = 'http://example.org/jobrouter/'; - self::assertSame($expected, (string)$actual); + self::assertSame($expected, (string) $actual); } #[Test] diff --git a/tests/Unit/Exception/HttpExceptionTest.php b/tests/Unit/Exception/HttpExceptionTest.php index a6282b0..956ded5 100644 --- a/tests/Unit/Exception/HttpExceptionTest.php +++ b/tests/Unit/Exception/HttpExceptionTest.php @@ -47,7 +47,7 @@ public function fromErrorReturnsInstantiatedHttpExceptionWithoutGivenPreviousExc #[Test] public function fromErrorReturnsInstantiatedHttpExceptionWithGivenPreviousExceptionCorrectly(): void { - $previous = new class() extends \RuntimeException implements ClientExceptionInterface {}; + $previous = new class extends \RuntimeException implements ClientExceptionInterface {}; $actual = HttpException::fromError(418, 'http://example.net/', 'another error', $previous);