Skip to content

Commit

Permalink
-refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
alexndlm committed Nov 14, 2024
1 parent ff39f5b commit dcf2ad9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/State/Provider/ContentNegotiationProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private function getInputFormat(HttpOperation $operation, Request $request): ?st
return $format;
}

if ($operation->canDeserialize() === true && !$request->isMethodSafe() && 'DELETE' !== $request->getMethod()) {
if (false !== $operation->canDeserialize() && !$request->isMethodSafe() && 'DELETE' !== $request->getMethod()) {
$supportedMimeTypes = [];
foreach ($formats as $mimeTypes) {
foreach ($mimeTypes as $mimeType) {
Expand Down
4 changes: 1 addition & 3 deletions tests/State/Provider/ContentNegotiationProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ public function testRequestWithInput(): void
$operation = $operation->withDeserialize();
$context = ['request' => $request];

$result = $provider->provide($operation, [], $context);

$this->assertSame($expectedResult, $result);
$provider->provide($operation, [], $context);
}
}

0 comments on commit dcf2ad9

Please sign in to comment.