Skip to content

Commit abf1480

Browse files
authored
Let PHPStan check array and iterable types & generics (#27)
1 parent 9bae16d commit abf1480

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/DenormalizeItemProcessor.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ final class DenormalizeItemProcessor implements ItemProcessorInterface
2727
private ?string $format;
2828

2929
/**
30-
* @var array
30+
* @phpstan-var array<string, mixed>
3131
*/
3232
private array $context;
3333

34+
/**
35+
* @phpstan-param array<string, mixed> $context
36+
*/
3437
public function __construct(
3538
DenormalizerInterface $denormalizer,
3639
string $type,

src/NormalizeItemProcessor.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ final class NormalizeItemProcessor implements ItemProcessorInterface
2222
private ?string $format;
2323

2424
/**
25-
* @var array
25+
* @phpstan-var array<string, mixed>
2626
*/
2727
private array $context;
2828

29+
/**
30+
* @phpstan-param array<string, mixed> $context
31+
*/
2932
public function __construct(NormalizerInterface $normalizer, string $format = null, array $context = [])
3033
{
3134
$this->normalizer = $normalizer;

0 commit comments

Comments
 (0)