1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

templating for ReflectionClass

This commit is contained in:
SignpostMarv 2019-02-08 23:15:37 +00:00 committed by Matthew Brown
parent 1b20d9ab57
commit 60f9d3558c

View File

@ -1151,3 +1151,21 @@ class SplObjectStorage implements Countable, Iterator, Serializable, ArrayAccess
public function getHash($object) {}
}
/**
* @template T as object
*
* @property-read class-string<T> $name
*/
class ReflectionClass implements Reflector {
/**
* @var class-string<T>
*/
public string $name;
/**
* @param T|class-string<T>
*/
public function __construct($argument) {}
}