Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Lines changed: 2 additions & 3 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /