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 1
1
<?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
+ >
3
13
<coverage >
4
14
<include >
5
15
<directory suffix =" .php" >src</directory >
Original file line number Diff line number Diff line change @@ -75,14 +75,14 @@ public static function provideInvalidArguments(): iterable
75
75
76
76
#[Test]
77
77
#[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
79
79
{
80
80
self ::assertSame ($ expected , Item::from ($ value )->toHttpValue ());
81
81
}
82
82
83
83
#[Test]
84
84
#[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
86
86
{
87
87
$ parameters = Parameters::fromAssociative (['foo ' => 'bar ' ]);
88
88
if ($ value instanceof Value) {
@@ -96,7 +96,7 @@ public function it_updates_item(mixed $value, string $expected): void
96
96
}
97
97
98
98
/**
99
- * @return iterable<string, array{value:mixed , expected:string}>>
99
+ * @return iterable<string, array{value:Value|DataType , expected:string}>>
100
100
*/
101
101
public static function provideFrom1stArgument (): iterable
102
102
{
Original file line number Diff line number Diff line change 5
5
namespace Bakame \Http \StructuredFields ;
6
6
7
7
use DateTimeImmutable ;
8
- use DateTimeInterface ;
9
- use Stringable ;
10
8
11
9
/**
12
- * @phpstan-type DataType ByteSequence|Token|DateTimeInterface|Stringable|string|int|float|bool
10
+ * @phpstan-type DataType ByteSequence|Token|\ DateTimeInterface|\ Stringable|string|int|float|bool
13
11
*/
14
12
interface Value extends ParameterAccess, StructuredField
15
13
{
@@ -28,6 +26,8 @@ public function type(): Type;
28
26
*
29
27
* This method MUST retain the state of the current instance, and return
30
28
* an instance that contains the specified value change.
29
+ *
30
+ * @param Value|DataType $value
31
31
*/
32
32
public function withValue (mixed $ value ): static ;
33
33
}
You can’t perform that action at this time.
0 commit comments