src/Reflection/ReflectionClass.php
public static function constructFromReflectionClass(\ReflectionClass $reflectionClass): self
    {
        /**
         * @var self $instance
         */
        $instance                  = self::getSelfReflection()->newInstanceWithoutConstructor();
        $instance->reflectionClass = $reflectionClass;

        return $instance;
    }
public static function constructFromReflectionClass(\ReflectionClass $reflectionClass): self
    {
        /**
         * @var self $instance
         */
        $instance                  = self::getSelfReflection()->newInstanceWithoutConstructor();
        $instance->reflectionClass = $reflectionClass;

        return $instance;
    }
For when we need to return instances of self from an existing instance of \ReflectionClass

@param \ReflectionClass $reflectionClass

@return self
@throws \ReflectionException