mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Improved generics for higher order
This commit is contained in:
@ -118,11 +118,14 @@ final class Reflection
|
||||
/**
|
||||
* Sets the property value of the given object.
|
||||
*
|
||||
* @param mixed $value
|
||||
* @template TValue of object
|
||||
*
|
||||
* @param TValue $object
|
||||
* @param mixed $value
|
||||
*/
|
||||
public static function setPropertyValue(object $object, string $property, $value): void
|
||||
{
|
||||
/** @var ReflectionClass $reflectionClass */
|
||||
/** @var ReflectionClass<TValue> $reflectionClass */
|
||||
$reflectionClass = new ReflectionClass($object);
|
||||
|
||||
$reflectionProperty = null;
|
||||
|
||||
Reference in New Issue
Block a user