@@ -83,7 +83,7 @@ class Http
83
83
*
84
84
* @param int $status The "code" for the HTTP status.
85
85
*
86
- * @return string|bool $status Returns the "HTTP status code" if found, FALSE otherwise.
86
+ * @return string|bool $status The "HTTP status code" if found, FALSE otherwise.
87
87
*/
88
88
public static function getStatusCode (int $ status ): string |bool
89
89
{
@@ -112,9 +112,9 @@ public static function setHeaders(string|array $headers): void
112
112
throw new Exception ('Headers were already sent. ' );
113
113
}
114
114
115
- // Loop elements and set header
116
- foreach ((array )$ headers as $ sHeader ) {
117
- header ((string )$ sHeader );
115
+ // Loop elements, cast type and set header
116
+ foreach ((array )$ headers as $ header ) {
117
+ header ((string )$ header );
118
118
}
119
119
}
120
120
@@ -137,13 +137,13 @@ public static function setHeadersByCode(int $code = StatusCode::OK): void
137
137
/**
138
138
* Set a HTTP Content Type.
139
139
*
140
- * @param string $sType Example: "text/xml".
140
+ * @param string $type The content type value. e.g., "text/xml".
141
141
*
142
142
* @throws Exception
143
143
*/
144
- public static function setContentType (string $ sType ): void
144
+ public static function setContentType (string $ type ): void
145
145
{
146
- static ::setHeaders ('Content-Type: ' . $ sType );
146
+ static ::setHeaders ('Content-Type: ' . $ type );
147
147
}
148
148
149
149
/**
@@ -175,4 +175,4 @@ private static function isSent(): bool
175
175
{
176
176
return headers_sent ();
177
177
}
178
- }
178
+ }
0 commit comments