Skip to content

Commit

Permalink
fixup! Validation only when body content is present
Browse files Browse the repository at this point in the history
  • Loading branch information
koriym committed Jan 20, 2024
1 parent 9264022 commit 01f6ad7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JsonSchema/Interceptor/JsonSchemaInterceptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function invoke(MethodInvocation $invocation): ResourceObject

$ro = $invocation->proceed();
assert($ro instanceof ResourceObject);
if ($ro->body && $ro->code === 200 || $ro->code === 201) {
if ($ro->body !== [] && $ro->code === 200 || $ro->code === 201) {

Check failure on line 63 in src/JsonSchema/Interceptor/JsonSchemaInterceptor.php

View workflow job for this annotation

GitHub Actions / cs / Coding Standards

Expected 1 space after logical operator; 2 found
$this->validateResponse($ro, $jsonSchema);
}

Expand Down

0 comments on commit 01f6ad7

Please sign in to comment.