diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 4e0f65ea931..87a8e310855 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -10631,7 +10631,7 @@ 'ReflectionParameter::getDefaultValue' => ['mixed'], 'ReflectionParameter::getDefaultValueConstantName' => ['?string'], 'ReflectionParameter::getName' => ['string'], -'ReflectionParameter::getPosition' => ['int'], +'ReflectionParameter::getPosition' => ['int<0, max>'], 'ReflectionParameter::getType' => ['?ReflectionType'], 'ReflectionParameter::hasType' => ['bool'], 'ReflectionParameter::isArray' => ['bool'], diff --git a/dictionaries/CallMap_historical.php b/dictionaries/CallMap_historical.php index 0d5e95c8226..d8669ba257e 100644 --- a/dictionaries/CallMap_historical.php +++ b/dictionaries/CallMap_historical.php @@ -5969,7 +5969,7 @@ 'ReflectionParameter::getDefaultValue' => ['mixed'], 'ReflectionParameter::getDefaultValueConstantName' => ['?string'], 'ReflectionParameter::getName' => ['string'], - 'ReflectionParameter::getPosition' => ['int'], + 'ReflectionParameter::getPosition' => ['int<0, max>'], 'ReflectionParameter::getType' => ['?ReflectionType'], 'ReflectionParameter::hasType' => ['bool'], 'ReflectionParameter::isArray' => ['bool'], diff --git a/stubs/Php80.phpstub b/stubs/Php80.phpstub index 2f2d5bf0b9b..0e1404b74ae 100644 --- a/stubs/Php80.phpstub +++ b/stubs/Php80.phpstub @@ -28,7 +28,7 @@ class ReflectionAttribute /** * @psalm-pure - * @return int-mask-of + * @return Attribute::TARGET_* */ public function getTarget() : int { diff --git a/stubs/Reflection.phpstub b/stubs/Reflection.phpstub index 3e86431e581..68bc4ffd094 100644 --- a/stubs/Reflection.phpstub +++ b/stubs/Reflection.phpstub @@ -416,7 +416,7 @@ abstract class ReflectionFunctionAbstract implements Reflector * @since 8.0 * @template TClass as object * @param class-string|null $name - * @return ($name is null ? array> : array>) + * @return ($name is null ? list> : list>) */ public function getAttributes(?string $name = null, int $flags = 0): array {} } @@ -463,7 +463,7 @@ class ReflectionProperty implements Reflector * @since 8.0 * @template TClass as object * @param class-string|null $name - * @return ($name is null ? array> : array>) + * @return ($name is null ? list> : list>) */ public function getAttributes(?string $name = null, int $flags = 0): array {} @@ -540,7 +540,7 @@ class ReflectionProperty implements Reflector class ReflectionMethod extends ReflectionFunctionAbstract { /** - * @var string + * @var non-empty-string * @readonly */ public $name; @@ -599,7 +599,7 @@ class ReflectionClassConstant implements Reflector * @since 8.0 * @template TClass as object * @param class-string|null $name - * @return ($name is null ? array> : array>) + * @return ($name is null ? list> : list>) */ public function getAttributes(?string $name = null, int $flags = 0): array {} @@ -635,7 +635,7 @@ class ReflectionParameter implements Reflector { * @since 8.0 * @template TClass as object * @param class-string|null $name - * @return ($name is null ? array> : array>) + * @return ($name is null ? list> : list>) */ public function getAttributes(?string $name = null, int $flags = 0): array {}