Skip to content

Commit f40b794

Browse files
committed
array<int, => list<
1 parent dd4739a commit f40b794

10 files changed

Lines changed: 15 additions & 15 deletions

src/Decoder/Decoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class Decoder implements DecoderInterface
1515
private array $decoderTypes = [];
1616

1717
/**
18-
* @param array<int, TypeDecoderInterface> $decoderTypes
18+
* @param list<TypeDecoderInterface> $decoderTypes
1919
*/
2020
public function __construct(array $decoderTypes)
2121
{
@@ -25,7 +25,7 @@ public function __construct(array $decoderTypes)
2525
}
2626

2727
/**
28-
* @return array<int, string>
28+
* @return list<string>
2929
*/
3030
public function getContentTypes(): array
3131
{

src/Decoder/DecoderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
interface DecoderInterface
1111
{
1212
/**
13-
* @return array<int, string>
13+
* @return list<string>
1414
*/
1515
public function getContentTypes(): array;
1616

src/Decoder/JsonxTypeDecoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private function decodeObjectNode(\DOMElement $node): array
105105
}
106106

107107
/**
108-
* @return array<int, mixed>
108+
* @return list<mixed>
109109
*/
110110
private function decodeArrayNode(\DOMElement $node): array
111111
{

src/Encoder/Encoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ final class Encoder implements EncoderInterface
1414
private array $encoderTypes = [];
1515

1616
/**
17-
* @param array<int, TypeEncoderInterface> $encoderTypes
17+
* @param list<TypeEncoderInterface> $encoderTypes
1818
*/
1919
public function __construct(array $encoderTypes)
2020
{
@@ -24,7 +24,7 @@ public function __construct(array $encoderTypes)
2424
}
2525

2626
/**
27-
* @return array<int, string>
27+
* @return list<string>
2828
*/
2929
public function getContentTypes(): array
3030
{

src/Encoder/EncoderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
interface EncoderInterface
1010
{
1111
/**
12-
* @return array<int, string>
12+
* @return list<string>
1313
*/
1414
public function getContentTypes(): array;
1515

src/Encoder/JsonxTypeEncoder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function encode(array $data): string
3535
/** @var array<string, mixed> $data */
3636
$rootNode = $this->createObjectNode($document, $data);
3737
} else {
38-
/** @var array<int, mixed> $data */
38+
/** @var list<mixed> $data */
3939
$rootNode = $this->createArrayNode($document, $data);
4040
}
4141

@@ -76,7 +76,7 @@ private function createObjectPropertyNode(\DOMDocument $document, int|string $su
7676
}
7777

7878
if (self::DATATYPE_ARRAY === $subValueType) {
79-
/** @var array<int, mixed> $subValue */
79+
/** @var list<mixed> $subValue */
8080
return $this->createArrayNode($document, $subValue, (string) $subName);
8181
}
8282

@@ -99,7 +99,7 @@ private function createObjectPropertyNode(\DOMDocument $document, int|string $su
9999
}
100100

101101
/**
102-
* @param array<int, mixed> $value
102+
* @param list<mixed> $value
103103
*/
104104
private function createArrayNode(\DOMDocument $document, array $value, ?string $name = null): \DOMElement
105105
{
@@ -126,7 +126,7 @@ private function createArrayValueNode(\DOMDocument $document, mixed $subValue):
126126
}
127127

128128
if (self::DATATYPE_ARRAY === $subValueType) {
129-
/** @var array<int, mixed> $subValue */
129+
/** @var list<mixed> $subValue */
130130
return $this->createArrayNode($document, $subValue);
131131
}
132132

src/ServiceFactory/DecoderFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ final class DecoderFactory extends AbstractFactory
1414
{
1515
public function __invoke(ContainerInterface $container): DecoderInterface
1616
{
17-
/** @var array<int, TypeDecoderInterface> $decoderTypes */
17+
/** @var list<TypeDecoderInterface> $decoderTypes */
1818
$decoderTypes = $container->get(TypeDecoderInterface::class.'[]'.$this->name);
1919

2020
return new Decoder($decoderTypes);

src/ServiceFactory/EncoderFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ final class EncoderFactory extends AbstractFactory
1414
{
1515
public function __invoke(ContainerInterface $container): EncoderInterface
1616
{
17-
/** @var array<int, TypeEncoderInterface> $encoderTypes */
17+
/** @var list<TypeEncoderInterface> $encoderTypes */
1818
$encoderTypes = $container->get(TypeEncoderInterface::class.'[]'.$this->name);
1919

2020
return new Encoder($encoderTypes);

src/ServiceFactory/TypeDecodersFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
final class TypeDecodersFactory
1414
{
1515
/**
16-
* @return array<int, TypeDecoderInterface>
16+
* @return list<TypeDecoderInterface>
1717
*/
1818
public function __invoke(): array
1919
{

src/ServiceFactory/TypeEncodersFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
final class TypeEncodersFactory
1515
{
1616
/**
17-
* @return array<int, TypeEncoderInterface>
17+
* @return list<TypeEncoderInterface>
1818
*/
1919
public function __invoke(ContainerInterface $container): array
2020
{

0 commit comments

Comments
 (0)