Skip to content

Commit

Permalink
Ignore code coverage for HTTP response code setting
Browse files Browse the repository at this point in the history
Added a code coverage ignore annotation for `http_response_code` in `StreamResponder.php` to avoid coverage tool issues for non-CLI environments. Also included an unrelated whitespace change in `composer.json`.
  • Loading branch information
koriym committed Nov 20, 2024
1 parent 6b81707 commit 6a9cbbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/StreamResponder.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __invoke(ResourceObject $resourceObject, array $server): void

// code
if (PHP_SAPI !== 'cli') {
http_response_code($resourceObject->code);
http_response_code($resourceObject->code); // @codeCoverageIgnore
}

// stream body
Expand Down
1 change: 1 addition & 0 deletions vendor-bin/tools/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
}
}
}

0 comments on commit 6a9cbbe

Please sign in to comment.