Skip to content

Commit

Permalink
[phpstorm-stubs] fix typehint mt_srand, srand
Browse files Browse the repository at this point in the history
  • Loading branch information
isfedorov committed Mar 24, 2023
1 parent 8fb00e5 commit 3589c3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions random/random.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function lcg_value(): float {}
/**
* Seeds the Mersenne Twister Random Number Generator
* @link https://php.net/manual/en/function.mt-srand.php
* @param int|null $seed <p>
* @param int $seed <p>
* An optional seed value
* </p>
* @param int $mode [optional] <p>
Expand All @@ -24,7 +24,7 @@ function lcg_value(): float {}
* @return void
*/
function mt_srand(
#[LanguageLevelTypeAware(['8.2' => 'int|null'], default: 'int')] $seed = null,
int $seed = null,
#[PhpStormStubsElementAvailable(from: '7.1')] int $mode = MT_RAND_MT19937
): void {}

Expand All @@ -34,7 +34,7 @@ function mt_srand(
* an alias of {@see mt_srand()}.
* </p>
* @link https://php.net/manual/en/function.srand.php
* @param int|null $seed <p>
* @param int $seed <p>
* Optional seed value
* </p>
* @param int $mode [optional] <p>
Expand All @@ -43,7 +43,7 @@ function mt_srand(
* @return void
*/
function srand(
#[LanguageLevelTypeAware(['8.2' => 'int|null'], default: 'int')] $seed = null,
int $seed = null,
#[PhpStormStubsElementAvailable(from: '7.1')] int $mode = MT_RAND_MT19937
): void {}

Expand Down

0 comments on commit 3589c3c

Please sign in to comment.