Skip to content

Commit

Permalink
Widen numeric-string to numeric but restrict the template
Browse files Browse the repository at this point in the history
Signed-off-by: George Steel <[email protected]>
  • Loading branch information
gsteel committed Apr 1, 2024
1 parent b431a9f commit 14ab60a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/AbstractDateDropdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @psalm-type InputArray = array<string, string>
* @template TOptions of Options
* @template-extends AbstractFilter<TOptions>
* @template TInput of array<array-key, string>
* @template TInput of array<array-key, numeric>
*/
abstract class AbstractDateDropdown extends AbstractFilter
{
Expand Down
6 changes: 3 additions & 3 deletions src/DateSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* ...
* }
* @psalm-type InputArray = array{
* year: numeric-string,
* month: numeric-string,
* day: numeric-string,
* year: numeric,
* month: numeric,
* day: numeric,
* }
* @template TOptions of Options
* @template-extends AbstractDateDropdown<TOptions, InputArray>
Expand Down
12 changes: 6 additions & 6 deletions src/DateTimeSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* ...
* }
* @psalm-type InputArray = array{
* year: numeric-string,
* month: numeric-string,
* day: numeric-string,
* hour: numeric-string,
* minute: numeric-string,
* second: numeric-string,
* year: numeric,
* month: numeric,
* day: numeric,
* hour: numeric,
* minute: numeric,
* second: numeric,
* }
* @template TOptions of Options
* @template-extends AbstractDateDropdown<TOptions, InputArray>
Expand Down
4 changes: 2 additions & 2 deletions src/MonthSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
* ...
* }
* @psalm-type InputArray = array{
* year: numeric-string,
* month: numeric-string,
* year: numeric,
* month: numeric,
* }
* @template TOptions of Options
* @template-extends AbstractDateDropdown<TOptions, InputArray>
Expand Down

0 comments on commit 14ab60a

Please sign in to comment.