Skip to content

Commit

Permalink
BaseFormElement: Change param type hint
Browse files Browse the repository at this point in the history
Since `ValidatorChain::addValidators($param)` requires $param of the type `Traversable<int|string, mixed>`, this class should reflect it.
  • Loading branch information
sukhwinder33445 committed May 3, 2024
1 parent a7be352 commit 7b7f3cc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/FormElement/BaseFormElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use ipl\Stdlib\Messages;
use ipl\Validator\ValidatorChain;
use ReflectionProperty;
use Traversable;

abstract class BaseFormElement extends BaseHtmlElement implements FormElement, ValueCandidates
{
Expand Down Expand Up @@ -184,7 +185,7 @@ public function getValidators()
/**
* Set the validators
*
* @param iterable $validators
* @param Traversable<int|string, mixed> $validators
*
* @return $this
*/
Expand All @@ -201,7 +202,7 @@ public function setValidators($validators)
/**
* Add validators
*
* @param iterable $validators
* @param Traversable<int|string, mixed> $validators
*
* @return $this
*/
Expand Down

0 comments on commit 7b7f3cc

Please sign in to comment.