Skip to content

Commit 74daec8

Browse files
committed
[phpstorm-stubs] Add #[LanguageLevelTypeAware] attributes to gmp_random_seed, gmp_import, and gmp_export
1 parent a9c4425 commit 74daec8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

gmp/gmp.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ function gmp_intval(GMP|string|int $num): int {}
4545
* The seed to be set for the {@see gmp_random()}, {@see gmp_random_bits()}, and {@see gmp_random_range()} functions.
4646
* </p>
4747
* Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number.
48-
* @return void|null|false Returns NULL on success.
48+
* @return void|false
4949
* @since 7.0
5050
*/
51+
#[LanguageLevelTypeAware(['8.0' => 'void'], default: 'void|false')]
5152
function gmp_random_seed(GMP|string|int $seed): void {}
5253
/**
5354
* Convert GMP number to string
@@ -676,6 +677,7 @@ function gmp_hamdist(GMP|string|int $num1, GMP|string|int $num2): int {}
676677
* @since 5.6.1
677678
*/
678679
#[Pure]
680+
#[LanguageLevelTypeAware(['8.0' => 'GMP'], default: 'GMP|false')]
679681
function gmp_import(string $data, int $word_size = 1, int $flags = GMP_MSW_FIRST|GMP_NATIVE_ENDIAN): GMP {}
680682

681683
/**
@@ -689,6 +691,7 @@ function gmp_import(string $data, int $word_size = 1, int $flags = GMP_MSW_FIRST
689691
* @since 5.6.1
690692
*/
691693
#[Pure]
694+
#[LanguageLevelTypeAware(['8.0' => 'string'], default: 'string|false')]
692695
function gmp_export(GMP|string|int $num, int $word_size = 1, int $flags = GMP_MSW_FIRST|GMP_NATIVE_ENDIAN): string {}
693696

694697
/**

0 commit comments

Comments
 (0)