mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Fix ReflectionClass::newInstanceArgs()
This commit is contained in:
parent
729c0ba5ed
commit
a669c89074
@ -11387,7 +11387,7 @@ return [
|
||||
'ReflectionClass::isTrait' => ['bool'],
|
||||
'ReflectionClass::isUserDefined' => ['bool'],
|
||||
'ReflectionClass::newInstance' => ['object', '...args='=>'mixed'],
|
||||
'ReflectionClass::newInstanceArgs' => ['object', 'args='=>'array<array-key, mixed>'],
|
||||
'ReflectionClass::newInstanceArgs' => ['object', 'args='=>'list<mixed>|array<string, mixed>'],
|
||||
'ReflectionClass::newInstanceWithoutConstructor' => ['object'],
|
||||
'ReflectionClass::setStaticPropertyValue' => ['void', 'name'=>'string', 'value'=>'mixed'],
|
||||
'ReflectionClassConstant::__construct' => ['void', 'class'=>'mixed', 'name'=>'string'],
|
||||
@ -11590,7 +11590,7 @@ return [
|
||||
'ReflectionObject::isTrait' => ['bool'],
|
||||
'ReflectionObject::isUserDefined' => ['bool'],
|
||||
'ReflectionObject::newInstance' => ['object', 'args='=>'mixed', '...args='=>'array'],
|
||||
'ReflectionObject::newInstanceArgs' => ['object', 'args='=>'array'],
|
||||
'ReflectionObject::newInstanceArgs' => ['object', 'args='=>'list<mixed>|array<string, mixed>'],
|
||||
'ReflectionObject::newInstanceWithoutConstructor' => ['object'],
|
||||
'ReflectionObject::setStaticPropertyValue' => ['void', 'name'=>'string', 'value'=>'string'],
|
||||
'ReflectionParameter::__clone' => ['void'],
|
||||
|
@ -259,12 +259,16 @@ return [
|
||||
],
|
||||
'ReflectionClass::newInstanceArgs' => [
|
||||
'old' => ['object', 'args='=>'list<mixed>'],
|
||||
'new' => ['object', 'args='=>'array<array-key, mixed>'],
|
||||
'new' => ['object', 'args='=>'list<mixed>|array<string, mixed>'],
|
||||
],
|
||||
'ReflectionMethod::getClosure' => [
|
||||
'old' => ['?Closure', 'object='=>'object'],
|
||||
'new' => ['Closure', 'object='=>'?object'],
|
||||
],
|
||||
'ReflectionObject::newInstanceArgs' => [
|
||||
'old' => ['object', 'args='=>'list<mixed>'],
|
||||
'new' => ['object', 'args='=>'list<mixed>|array<string, mixed>'],
|
||||
],
|
||||
'ReflectionProperty::getValue' => [
|
||||
'old' => ['mixed', 'object='=>'object'],
|
||||
'new' => ['mixed', 'object='=>'null|object'],
|
||||
|
@ -6217,7 +6217,7 @@ return [
|
||||
'ReflectionObject::isTrait' => ['bool'],
|
||||
'ReflectionObject::isUserDefined' => ['bool'],
|
||||
'ReflectionObject::newInstance' => ['object', 'args='=>'mixed', '...args='=>'array'],
|
||||
'ReflectionObject::newInstanceArgs' => ['object', 'args='=>'array'],
|
||||
'ReflectionObject::newInstanceArgs' => ['object', 'args='=>'list<mixed>'],
|
||||
'ReflectionObject::newInstanceWithoutConstructor' => ['object'],
|
||||
'ReflectionObject::setStaticPropertyValue' => ['void', 'name'=>'string', 'value'=>'string'],
|
||||
'ReflectionParameter::__clone' => ['void'],
|
||||
|
@ -110,6 +110,13 @@ class ReflectionClass implements Reflector {
|
||||
* @psalm-pure
|
||||
*/
|
||||
public function getExtensionName(): string|false {}
|
||||
|
||||
/**
|
||||
* @param list<mixed>|array<string, mixed> $args
|
||||
*
|
||||
* @return T
|
||||
*/
|
||||
public function newInstanceArgs(array $args): object {}
|
||||
}
|
||||
|
||||
/** @psalm-immutable */
|
||||
|
@ -196,7 +196,7 @@ class ReflectionClass implements Reflector {
|
||||
public function newInstance(...$args): object {}
|
||||
|
||||
/**
|
||||
* @param array<int, mixed> $args
|
||||
* @param list<mixed> $args
|
||||
*
|
||||
* @return T
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user