File tree Expand file tree Collapse file tree 3 files changed +4
-27
lines changed Expand file tree Collapse file tree 3 files changed +4
-27
lines changed Original file line number Diff line number Diff line change @@ -291,12 +291,13 @@ so they all expect an associative iterable to represents the parameters.
291
291
use Bakame\Http\StructuredFields\Item;
292
292
use Bakame\Http\StructuredFields\Value;
293
293
294
- Item::from($value, iterable<string , Value > $associativeParameters = []): self;
295
- Item::fromPair(array{0:mixed, 1:iterable<array {0:string, 1:Value} >} $pair): self;
294
+ //@type DataType ByteSequence|Token|DateTimeInterface|Stringable|string|int|float|bool
295
+
296
+ Item::from(DataType $value, iterable<string , Value > $associativeParameters = []): self;
297
+ Item::fromPair(array{0:DataType, 1:iterable<array {0:string, 1:DataType} >} $pair): self;
296
298
Item::fromDecodedByteSequence(string $value): self;
297
299
Item::fromEncodedByteSequence(string $value): self;
298
300
Item::fromToken(string $value): self;
299
- Item::fromDate(DateTimeInterface $datetime): self;
300
301
Item::fromTimestamp(int $value): self;
301
302
Item::fromDateFormat(string $format, string $datetime): self;
302
303
Item::fromDateString(string $datetime, DateTimeZone|string|null $timezone): self;
Original file line number Diff line number Diff line change @@ -126,14 +126,6 @@ public static function fromToken(Stringable|string $value): self
126
126
return self ::from (Token::fromString ($ value ));
127
127
}
128
128
129
- /**
130
- * Returns a new instance from a Token and an iterable of key-value parameters.
131
- */
132
- public static function fromDate (DateTimeInterface $ datetime ): self
133
- {
134
- return self ::from ($ datetime );
135
- }
136
-
137
129
/**
138
130
* Returns a new instance from a timestamp and an iterable of key-value parameters.
139
131
*/
Original file line number Diff line number Diff line change @@ -149,14 +149,6 @@ public function it_fails_to_instantiate_an_out_of_range_timestamp_in_the_future(
149
149
Item::fromTimestamp (1_000_000_000_000_000 );
150
150
}
151
151
152
- #[Test]
153
- public function it_fails_to_instantiate_an_out_of_range_date_instance_in_the_future (): void
154
- {
155
- $ this ->expectException (SyntaxError::class);
156
-
157
- Item::fromDate (new DateTime ('@ ' . 1_000_000_000_000_000 ));
158
- }
159
-
160
152
#[Test]
161
153
public function it_fails_to_instantiate_an_out_of_range_date_in_the_past (): void
162
154
{
@@ -165,14 +157,6 @@ public function it_fails_to_instantiate_an_out_of_range_date_in_the_past(): void
165
157
Item::from (new DateTime ('@ ' .-1_000_000_000_000_000 ));
166
158
}
167
159
168
- #[Test]
169
- public function it_fails_to_instantiate_an_out_of_range_date_instance_in_the_past (): void
170
- {
171
- $ this ->expectException (SyntaxError::class);
172
-
173
- Item::fromDate (new DateTime ('@ ' .-1_000_000_000_000_000 ));
174
- }
175
-
176
160
#[Test]
177
161
public function it_fails_to_instantiate_an_out_of_range_timestamp_in_the_past (): void
178
162
{
You can’t perform that action at this time.
0 commit comments