Skip to content

Commit

Permalink
add other null check
Browse files Browse the repository at this point in the history
  • Loading branch information
dododedodonl committed Nov 27, 2024
1 parent 36d4ffc commit ef5cefe
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function maxItems(int | Closure | null $count): static
{
$this->maxItems = $count;

$this->rule('array');
$this->rule('array', static fn (Component $component): bool => $component->getMaxItems() !== null);
$this->rule(static function (Component $component): string {
/** @var static $component */
$count = $component->getMaxItems();
Expand All @@ -30,7 +30,7 @@ public function minItems(int | Closure | null $count): static
{
$this->minItems = $count;

$this->rule('array');
$this->rule('array', static fn (Component $component): bool => $component->getMinItems() !== null);
$this->rule(static function (Component $component): string {
/** @var static $component */
$count = $component->getMinItems();
Expand Down

0 comments on commit ef5cefe

Please sign in to comment.