File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed
Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
2- <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.0/phpunit.xsd" bootstrap =" vendor/autoload.php" backupGlobals =" false" colors =" true" processIsolation =" false" stopOnFailure =" false" cacheDirectory =" .phpunit.cache" backupStaticProperties =" false" >
2+ <phpunit
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.0/phpunit.xsd"
5+ bootstrap =" vendor/autoload.php"
6+ backupGlobals =" false"
7+ colors =" true"
8+ processIsolation =" false"
9+ stopOnFailure =" false"
10+ cacheDirectory =" .phpunit.cache"
11+ backupStaticProperties =" false"
12+ >
313 <coverage >
414 <include >
515 <directory suffix =" .php" >src</directory >
Original file line number Diff line number Diff line change @@ -75,14 +75,14 @@ public static function provideInvalidArguments(): iterable
7575
7676 #[Test]
7777 #[DataProvider('provideFrom1stArgument ' )]
78- public function it_instantiate_many_types (mixed $ value , string $ expected ): void
78+ public function it_instantiate_many_types (Value | ByteSequence | Token | DateTimeInterface | Stringable | string | int | float | bool $ value , string $ expected ): void
7979 {
8080 self ::assertSame ($ expected , Item::from ($ value )->toHttpValue ());
8181 }
8282
8383 #[Test]
8484 #[DataProvider('provideFrom1stArgument ' )]
85- public function it_updates_item (mixed $ value , string $ expected ): void
85+ public function it_updates_item (Value | ByteSequence | Token | DateTimeInterface | Stringable | string | int | float | bool $ value , string $ expected ): void
8686 {
8787 $ parameters = Parameters::fromAssociative (['foo ' => 'bar ' ]);
8888 if ($ value instanceof Value) {
@@ -96,7 +96,7 @@ public function it_updates_item(mixed $value, string $expected): void
9696 }
9797
9898 /**
99- * @return iterable<string, array{value:mixed , expected:string}>>
99+ * @return iterable<string, array{value:Value|DataType , expected:string}>>
100100 */
101101 public static function provideFrom1stArgument (): iterable
102102 {
Original file line number Diff line number Diff line change 55namespace Bakame \Http \StructuredFields ;
66
77use DateTimeImmutable ;
8- use DateTimeInterface ;
9- use Stringable ;
108
119/**
12- * @phpstan-type DataType ByteSequence|Token|DateTimeInterface|Stringable|string|int|float|bool
10+ * @phpstan-type DataType ByteSequence|Token|\ DateTimeInterface|\ Stringable|string|int|float|bool
1311 */
1412interface Value extends ParameterAccess, StructuredField
1513{
@@ -28,6 +26,8 @@ public function type(): Type;
2826 *
2927 * This method MUST retain the state of the current instance, and return
3028 * an instance that contains the specified value change.
29+ *
30+ * @param Value|DataType $value
3131 */
3232 public function withValue (mixed $ value ): static ;
3333}
You can’t perform that action at this time.
0 commit comments