Skip to content

Commit 248e61f

Browse files
committed
[phpstorm-stubs] mark some of parameters with psalm's positive-int
1 parent ba04f8a commit 248e61f

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

calendar/calendar.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function easter_date(?int $year, #[PhpStormStubsElementAvailable(from: '8.0')] i
174174
/**
175175
* Get number of days after March 21 on which Easter falls for a given year
176176
* @link https://php.net/manual/en/function.easter-days.php
177-
* @param int|null $year [optional] <p>
177+
* @param positive-int|null $year [optional] <p>
178178
* The year as a positive number
179179
* </p>
180180
* @param int $mode [optional] <p>

gmp/gmp.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ function gmp_sqrtrem(GMP|string|int $num): array {}
313313
* </p>
314314
* <p>It can be either a GMP number resource, or a
315315
* numeric string given that it is possible to convert the latter to a number.</p>
316-
* @param int $exponent <p>
316+
* @param positive-int $exponent <p>
317317
* The positive power to raise the <i>base</i>.
318318
* </p>
319319
* @return resource|GMP The new (raised) number, as a GMP number. The case of
@@ -693,7 +693,7 @@ function gmp_export(GMP|string|int $num, int $word_size = 1, int $flags = GMP_MS
693693
* @link https://php.net/manual/en/function.gmp-root.php
694694
* @param GMP|string|int $num <p>Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6
695695
* and later, or a numeric string provided that it is possible to convert the latter to a number.</p>
696-
* @param int $nth The positive root to take of a.
696+
* @param positive-int $nth The positive root to take of a <b>num</b>.
697697
* @return GMP The integer component of the resultant root, as a GMP number.
698698
* @since 5.6
699699
*/
@@ -705,7 +705,7 @@ function gmp_root(GMP|string|int $num, int $nth): GMP {}
705705
* @link https://php.net/manual/en/function.gmp-rootrem.php
706706
* @param GMP|string|int $num <p>Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6
707707
* and later, or a numeric string provided that it is possible to convert the latter to a number.</p>
708-
* @param int $nth The positive root to take of a.
708+
* @param positive-int $nth The positive root to take of a <b>num</b>.
709709
* @return array|GMP[] <p>A two element array, where the first element is the integer component of
710710
* the root, and the second element is the remainder, both represented as GMP numbers.</p>
711711
* @since 5.6

openssl/openssl.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ function openssl_pkey_derive(
11331133
* <p>It also indicates if a cryptographically strong algorithm was used to produce the pseudo-random bytes,
11341134
* and does this via the optional crypto_strong parameter. It's rare for this to be FALSE, but some systems may be broken or old.</p>
11351135
* @link https://php.net/manual/en/function.openssl-random-pseudo-bytes.php
1136-
* @param int $length <p>
1136+
* @param positive-int $length <p>
11371137
* The length of the desired string of bytes. Must be a positive integer. PHP will
11381138
* try to cast this parameter to a non-null integer to use it.
11391139
* </p>

standard/standard_0.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ function usleep(int $microseconds): void {}
187187
/**
188188
* Delay for a number of seconds and nanoseconds
189189
* @link https://php.net/manual/en/function.time-nanosleep.php
190-
* @param int $seconds <p>
190+
* @param positive-int $seconds <p>
191191
* Must be a positive integer.
192192
* </p>
193-
* @param int $nanoseconds <p>
193+
* @param positive-int $nanoseconds <p>
194194
* Must be a positive integer less than 1 billion.
195195
* </p>
196196
* @return bool|array true on success or false on failure.

standard/standard_8.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ function array_fill_keys(array $keys, mixed $value): array {}
908908
* @param mixed $end <p>
909909
* The sequence is ended upon reaching the end value.
910910
* </p>
911-
* @param int|float $step [optional] <p>
911+
* @param positive-int|float $step [optional] <p>
912912
* If a step value is given, it will be used as the
913913
* increment between elements in the sequence. step
914914
* should be given as a positive number. If not specified,

0 commit comments

Comments
 (0)