Skip to content

Commit

Permalink
Remove 'self' from types
Browse files Browse the repository at this point in the history
  • Loading branch information
olvlvl committed Nov 17, 2024
1 parent a9e7b61 commit 5cdd202
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/Headers/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use DateTimeZone;

/**
* A date time object that renders into a string formatted for HTTP header fields.
* Representation of a 'Date' header field.
*
* @property-read bool $is_empty
* Whether the value of the {@see Date} is empty.
Expand All @@ -19,14 +19,12 @@
readonly class Date
{
public static function from(
self|DateTimeInterface|int|string|null $source
DateTimeInterface|int|string|null $source
): self {
$timezone = null;

if ($source === null) {
return new self();
} elseif ($source instanceof self) {
return $source;
} elseif ($source instanceof DateTimeInterface) {
$timezone = $source->getTimezone();
$source = $source->format('Y-m-d\TH:i:s.u');
Expand Down

0 comments on commit 5cdd202

Please sign in to comment.