Skip to content

Commit f9f6958

Browse files
committed
update type alias definition
1 parent 0626102 commit f9f6958

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

src/Dictionary.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ final class Dictionary implements ArrayAccess, Countable, IteratorAggregate
3838
private readonly array $members;
3939

4040
/**
41-
* @param iterable<string, InnerList|Item|SfMemberInput> $members
41+
* @param iterable<string, SfMemberInput> $members
4242
*/
4343
private function __construct(iterable $members = [])
4444
{
@@ -51,7 +51,7 @@ private function __construct(iterable $members = [])
5151
}
5252

5353
/**
54-
* @param InnerList|Item|SfMemberInput $member
54+
* @param SfMemberInput $member
5555
*/
5656
private static function filterMember(mixed $member): InnerList|Item
5757
{
@@ -84,7 +84,7 @@ public static function new(): self
8484
* its keys represent the dictionary entry name
8585
* its values represent the dictionary entry value
8686
*
87-
* @param StructuredFieldProvider|iterable<string, InnerList|Item|SfMemberInput> $members
87+
* @param StructuredFieldProvider|iterable<string, SfMemberInput> $members
8888
*/
8989
public static function fromAssociative(StructuredFieldProvider|iterable $members): self
9090
{
@@ -108,7 +108,7 @@ public static function fromAssociative(StructuredFieldProvider|iterable $members
108108
* the first member represents the instance entry name
109109
* the second member represents the instance entry value
110110
*
111-
* @param StructuredFieldProvider|Dictionary|Parameters|iterable<array{0:string, 1?:InnerList|Item|SfMemberInput}> $pairs
111+
* @param StructuredFieldProvider|Dictionary|Parameters|iterable<array{0:string, 1?:SfMemberInput}> $pairs
112112
*/
113113
public static function fromPairs(StructuredFieldProvider|Dictionary|Parameters|iterable $pairs): self
114114
{
@@ -489,7 +489,7 @@ public function last(): array
489489
* This method MUST retain the state of the current instance, and return
490490
* an instance that contains the specified changes.
491491
*
492-
* @param InnerList|Item|SfMemberInput|null $member
492+
* @param SfMemberInput|null $member
493493
*
494494
* @throws SyntaxError If the string name is not a valid
495495
*/
@@ -580,7 +580,7 @@ public function removeByNames(string ...$names): self
580580
* This method MUST retain the state of the current instance, and return
581581
* an instance that contains the specified changes.
582582
*
583-
* @param InnerList|Item|SfMemberInput|null $member
583+
* @param SfMemberInput|null $member
584584
* @throws SyntaxError If the string name is not a valid
585585
*/
586586
public function append(
@@ -602,7 +602,7 @@ public function append(
602602
* This method MUST retain the state of the current instance, and return
603603
* an instance that contains the specified changes.
604604
*
605-
* @param InnerList|Item|SfMemberInput|null $member
605+
* @param SfMemberInput|null $member
606606
*
607607
* @throws SyntaxError If the string name is not a valid
608608
*/
@@ -625,7 +625,7 @@ public function prepend(
625625
* This method MUST retain the state of the current instance, and return
626626
* an instance that contains the specified changes.
627627
*
628-
* @param array{0:string, 1:InnerList|Item|SfMemberInput} ...$pairs
628+
* @param array{0:string, 1:SfMemberInput} ...$pairs
629629
*/
630630
public function push(array ...$pairs): self
631631
{
@@ -644,7 +644,7 @@ public function push(array ...$pairs): self
644644
* This method MUST retain the state of the current instance, and return
645645
* an instance that contains the specified changes.
646646
*
647-
* @param array{0:string, 1:InnerList|Item|SfMemberInput} ...$pairs
647+
* @param array{0:string, 1:SfMemberInput} ...$pairs
648648
*/
649649
public function unshift(array ...$pairs): self
650650
{
@@ -663,7 +663,7 @@ public function unshift(array ...$pairs): self
663663
* This method MUST retain the state of the current instance, and return
664664
* an instance that contains the specified changes.
665665
*
666-
* @param array{0:string, 1:InnerList|Item|SfMemberInput} ...$members
666+
* @param array{0:string, 1:SfMemberInput} ...$members
667667
*/
668668
public function insert(int $index, array ...$members): self
669669
{
@@ -688,7 +688,7 @@ public function insert(int $index, array ...$members): self
688688
* This method MUST retain the state of the current instance, and return
689689
* an instance that contains the specified changes.
690690
*
691-
* @param array{0:string, 1:InnerList|Item|SfMemberInput} $pair
691+
* @param array{0:string, 1:SfMemberInput} $pair
692692
*/
693693
public function replace(int $index, array $pair): self
694694
{
@@ -708,7 +708,7 @@ public function replace(int $index, array $pair): self
708708
* This method MUST retain the state of the current instance, and return
709709
* an instance that contains the specified changes.
710710
*
711-
* @param StructuredFieldProvider|Dictionary|Parameters|iterable<string, InnerList|Item|SfMemberInput> ...$others
711+
* @param StructuredFieldProvider|Dictionary|Parameters|iterable<string, SfMemberInput> ...$others
712712
*/
713713
public function mergeAssociative(StructuredFieldProvider|iterable ...$others): self
714714
{
@@ -739,7 +739,7 @@ public function mergeAssociative(StructuredFieldProvider|iterable ...$others): s
739739
* This method MUST retain the state of the current instance, and return
740740
* an instance that contains the specified changes.
741741
*
742-
* @param StructuredFieldProvider|Dictionary|Parameters|iterable<array{0:string, 1:InnerList|Item|SfMemberInput}> ...$others
742+
* @param StructuredFieldProvider|Dictionary|Parameters|iterable<array{0:string, 1:SfMemberInput}> ...$others
743743
*/
744744
public function mergePairs(StructuredFieldProvider|Dictionary|Parameters|iterable ...$others): self
745745
{

src/OuterList.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ final class OuterList implements ArrayAccess, Countable, IteratorAggregate
4242
private readonly array $members;
4343

4444
/**
45-
* @param InnerList|Item|SfMemberInput ...$members
45+
* @param SfMemberInput ...$members
4646
*/
4747
private function __construct(
4848
iterable|StructuredFieldProvider|OuterList|Dictionary|InnerList|Parameters|Item|Token|Bytes|DisplayString|DateTimeInterface|string|int|float|bool ...$members
@@ -51,7 +51,7 @@ private function __construct(
5151
}
5252

5353
/**
54-
* @param InnerList|Item|SfMemberInput $member
54+
* @param SfMemberInput $member
5555
*/
5656
private function filterMember(mixed $member): InnerList|Item
5757
{
@@ -89,7 +89,7 @@ public static function fromHttpValue(Stringable|string $httpValue, ?Ietf $rfc =
8989
}
9090

9191
/**
92-
* @param iterable<SfInnerListPair|SfItemPair>|InnerList $pairs
92+
* @param StructuredFieldProvider|iterable<SfInnerListPair|SfItemPair> $pairs
9393
*/
9494
public static function fromPairs(StructuredFieldProvider|iterable $pairs): self
9595
{
@@ -143,7 +143,7 @@ public static function fromPairs(StructuredFieldProvider|iterable $pairs): self
143143
}
144144

145145
/**
146-
* @param InnerList|Item|SfMemberInput ...$members
146+
* @param SfMemberInput ...$members
147147
*/
148148
public static function new(iterable|StructuredFieldProvider|OuterList|Dictionary|InnerList|Parameters|Item|Token|Bytes|DisplayString|DateTimeInterface|string|int|float|bool ...$members): self
149149
{
@@ -276,7 +276,7 @@ public function last(): InnerList|Item|null
276276
/**
277277
* Inserts members at the beginning of the list.
278278
*
279-
* @param StructuredFieldProvider|InnerList|Item|SfMemberInput ...$members
279+
* @param SfMemberInput ...$members
280280
*/
281281
public function unshift(
282282
StructuredFieldProvider|OuterList|Dictionary|InnerList|Parameters|Item|iterable|Token|Bytes|DisplayString|DateTimeInterface|string|int|float|bool ...$members
@@ -302,7 +302,7 @@ function (array $carry, $member) {
302302
/**
303303
* Inserts members at the end of the list.
304304
*
305-
* @param InnerList|Item|SfMemberInput ...$members
305+
* @param SfMemberInput ...$members
306306
*/
307307
public function push(
308308
iterable|StructuredFieldProvider|OuterList|Dictionary|InnerList|Parameters|Item|Token|Bytes|DisplayString|DateTimeInterface|string|int|float|bool ...$members
@@ -328,7 +328,7 @@ function (array $carry, $member) {
328328
/**
329329
* Inserts members starting at the given index.
330330
*
331-
* @param InnerList|Item|SfMemberInput ...$members
331+
* @param SfMemberInput ...$members
332332
*
333333
* @throws InvalidOffset If the index does not exist
334334
*/
@@ -351,7 +351,7 @@ public function insert(
351351
}
352352

353353
/**
354-
* @param InnerList|Item|SfMemberInput $member
354+
* @param iterable<SfMemberInput>|SfMemberInput $member
355355
*/
356356
public function replace(
357357
int $index,

src/Parameters.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ public function replace(int $index, array $pair): self
635635
}
636636

637637
/**
638-
* @param StructuredFieldProvider|Parameters|iterable<string, SfItemInput> ...$others
638+
* @param StructuredFieldProvider|Dictionary|Parameters|iterable<string, SfItemInput> ...$others
639639
*/
640640
public function mergeAssociative(StructuredFieldProvider|iterable ...$others): self
641641
{

src/StructuredFieldProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
/**
1111
* @phpstan-type SfType Bytes|Token|DisplayString|DateTimeImmutable|string|int|float|bool
1212
* @phpstan-type SfTypeInput SfType|DateTimeInterface
13-
* @phpstan-type SfDataTyoe Dictionary|InnerList|Item|OuterList|Parameters
14-
* @phpstan-type SfItemInput SfTypeInput|SfDataTyoe|StructuredFieldProvider
13+
* @phpstan-type SfDataType Dictionary|InnerList|Item|OuterList|Parameters
14+
* @phpstan-type SfItemInput SfTypeInput|SfDataType|StructuredFieldProvider
1515
* @phpstan-type SfMemberInput iterable<SfItemInput>|SfItemInput
1616
* @phpstan-type SfParameterInput iterable<array{0:string, 1?:SfItemInput}>
1717
* @phpstan-type SfInnerListPair array{0:iterable<SfItemInput>, 1?:Parameters|SfParameterInput}

0 commit comments

Comments
 (0)