Skip to content

Commit 3d00922

Browse files
authored
Readability: Rename isSent() method to areHeadersSent
That way, the name is more explicit, preventing any potential confusion at a glance
1 parent c775b6c commit 3d00922

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Http.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ public static function getHeadersList(): array
107107
*/
108108
public static function setHeaders(string|array $headers): void
109109
{
110-
// Header already sent
111-
if (static::isSent()) {
110+
if (static::areHeadersSent()) {
112111
throw new Exception('Headers were already sent.');
113112
}
114113

@@ -171,7 +170,7 @@ public static function getProtocol(): ?string
171170
*
172171
* @return bool TRUE if the headers were sent, FALSE if not.
173172
*/
174-
private static function isSent(): bool
173+
private static function areHeadersSent(): bool
175174
{
176175
return headers_sent();
177176
}

0 commit comments

Comments
 (0)