fix some typehints to match reflection

This commit is contained in:
Ivan Fedorov 2021-07-07 13:12:01 +03:00 committed by Ivan Fedorov
parent 9a07e0bbf0
commit ecd2627f47
4 changed files with 5 additions and 4 deletions

View File

@ -29,7 +29,7 @@ class ReflectionParameter implements Reflector
* of the parameter (starting with zero), or a the parameter name as string.
* @throws \ReflectionException if the function or parameter does not exist.
*/
public function __construct(callable $function, #[LanguageLevelTypeAware(['8.0' => 'string|int'], default: '')] $param) {}
public function __construct($function, #[LanguageLevelTypeAware(['8.0' => 'string|int'], default: '')] $param) {}
/**
* Exports

View File

@ -856,7 +856,8 @@ function mb_encode_numericentity(string $string, array $map, ?string $encoding =
* @return string|false|null The converted string.
*/
#[Pure]
function mb_decode_numericentity(string $string, array $map, ?string $encoding = null, #[PhpStormStubsElementAvailable(from: '7.2', to: '7.4')] $is_hex = false): string|false|null {}
#[LanguageLevelTypeAware(['8.0' => 'string'], default: 'string|false|null')]
function mb_decode_numericentity(string $string, array $map, ?string $encoding = null, #[PhpStormStubsElementAvailable(from: '7.2', to: '7.4')] $is_hex = false) {}
/**
* Send encoded mail

View File

@ -843,7 +843,7 @@ function extract(array &$array, int $flags, string $prefix): int {}
* @return array the output array with all the variables added to it.
*/
#[Pure]
function compact(#[PhpStormStubsElementAvailable(from: '8.0')] mixed $var_name, #[Required(from: '5.3', to: '7.4')] ...$var_names): array {}
function compact(#[PhpStormStubsElementAvailable(from: '8.0')] $var_name, #[Required(from: '5.3', to: '7.4')] ...$var_names): array {}
/**
* Fill an array with values

View File

@ -340,7 +340,7 @@ function array_uintersect(
array $array,
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] array $array2,
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] callable $data_compare_func,
#[PhpStormStubsElementAvailable(from: '8.0')] array ...$rest
#[PhpStormStubsElementAvailable(from: '8.0')] ...$rest
): array {}
/**