File tree 4 files changed +11
-8
lines changed
4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 1
- # PHP HTTP Response
1
+ # PHP HTTP Response Headers
2
2
3
3
** Simple PHP package to easily send the right HTTP header responses to the browser 🐘**
4
4
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " ph-7/php-http-response-header" ,
3
- "description" : " A simple package to send HTTP header responses from your PHP application" ,
3
+ "description" : " A simple package to send HTTP response headers from your PHP application" ,
4
4
"keywords" : [
5
5
" HTTP status code" ,
6
6
" status code" ,
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" utf-8" ?>
2
- <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" bootstrap =" vendor/autoload.php" colors =" true" xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.2/phpunit.xsd" cacheDirectory =" .phpunit.cache" >
3
- <coverage />
4
- <testsuites >
2
+ <phpunit
3
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/|version|/phpunit.xsd"
5
+ bootstrap =" vendor/autoload.php"
6
+ colors =" true"
7
+ cacheDirectory =" .phpunit.cache" >
8
+ <testsuites >
5
9
<testsuite name =" Unit Tests" >
6
10
<directory >tests</directory >
7
11
</testsuite >
Original file line number Diff line number Diff line change @@ -108,8 +108,7 @@ public static function getHeadersList(): array
108
108
*/
109
109
public static function setHeaders (string |array $ headers ): void
110
110
{
111
- // Header already sent
112
- if (static ::isSent ()) {
111
+ if (static ::areHeadersSent ()) {
113
112
throw new Exception ('Headers were already sent. ' );
114
113
}
115
114
@@ -172,7 +171,7 @@ public static function getProtocol(): ?string
172
171
*
173
172
* @return bool TRUE if the headers were sent, FALSE if not.
174
173
*/
175
- private static function isSent (): bool
174
+ private static function areHeadersSent (): bool
176
175
{
177
176
return headers_sent ();
178
177
}
You can’t perform that action at this time.
0 commit comments