Skip to content

Commit

Permalink
chore: update brotkrueml/coding-standards to 6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
brotkrueml committed Aug 27, 2024
1 parent a38d16a commit 38ed6d6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions src/Client/IncidentsClientDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() !== '') {
Expand All @@ -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) {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Mapper/MultipartFormDataMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Check warning on line 62 in src/Mapper/MultipartFormDataMapper.php

View workflow job for this annotation

GitHub Actions / Code Quality

Escaped Mutant for Mutator "UnwrapArrayValues": @@ @@ } // @phpstan-ignore-next-line Use value object over return of values return ['name' => $name, 'contents' => (string) $value]; - }, \array_keys($data), \array_values($data)); + }, \array_keys($data), $data); } }
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Client/IncidentsClientDecoratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public static function dataProvider(): iterable
],
];

$fileStub = new class() implements FileInterface {
$fileStub = new class implements FileInterface {
public function toArray(): array
{
return [];
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Configuration/ClientConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Exception/HttpExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 38ed6d6

Please sign in to comment.