Skip to content

Commit 6ef63cf

Browse files
committed
minor #43903 Fix more generic types (derrabus)
This PR was merged into the 5.4 branch. Discussion ---------- Fix more generic types | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A Some changes I wanted to push to #42471, but then it got merged already. 😇 Commits ------- c54d61e9af Fix more generic types
2 parents 30de41f + 215bb9b commit 6ef63cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ConstraintViolationList.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@
2121
class ConstraintViolationList implements \IteratorAggregate, ConstraintViolationListInterface
2222
{
2323
/**
24-
* @var ConstraintViolationInterface[]
24+
* @var list<ConstraintViolationInterface>
2525
*/
2626
private $violations = [];
2727

2828
/**
2929
* Creates a new constraint violation list.
3030
*
31-
* @param ConstraintViolationInterface[] $violations The constraint violations to add to the list
31+
* @param iterable<mixed, ConstraintViolationInterface> $violations The constraint violations to add to the list
3232
*/
33-
public function __construct(array $violations = [])
33+
public function __construct(iterable $violations = [])
3434
{
3535
foreach ($violations as $violation) {
3636
$this->add($violation);

0 commit comments

Comments
 (0)