Skip to content

Commit 5cdd202

Browse files
committed
Remove 'self' from types
1 parent a9e7b61 commit 5cdd202

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/Headers/Date.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use DateTimeZone;
88

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

2626
if ($source === null) {
2727
return new self();
28-
} elseif ($source instanceof self) {
29-
return $source;
3028
} elseif ($source instanceof DateTimeInterface) {
3129
$timezone = $source->getTimezone();
3230
$source = $source->format('Y-m-d\TH:i:s.u');

0 commit comments

Comments
 (0)