Skip to content

Commit

Permalink
Structure: range is ?int, ?int [Closes #20]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Dec 15, 2020
1 parent ab5f748 commit 0147fe8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Schema/Elements/Structure.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ final class Structure implements Schema
/** @var Schema|null for array|list */
private $otherItems;

/** @var array */
/** @var array{?int, ?int} */
private $range = [null, null];


Expand All @@ -47,14 +47,14 @@ public function default($value): self
}


public function min(?float $min): self
public function min(?int $min): self
{
$this->range[0] = $min;
return $this;
}


public function max(?float $max): self
public function max(?int $max): self
{
$this->range[1] = $max;
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/Schema/Elements/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class Type implements Schema
/** @var Schema|null for arrays */
private $items;

/** @var array */
/** @var array{?float, ?float} */
private $range = [null, null];

/** @var string|null */
Expand Down

0 comments on commit 0147fe8

Please sign in to comment.