src/Reflection/ReflectionFunctionAbstract.php
public function isGenerator() : bool
    {
        if ($this->node === null) {
            return false;
        }

        return $this->nodeIsOrContainsYield($this->node);
    }
public function isGenerator() : bool
    {
        if ($this->node === null) {
            return false;
        }

        return $this->nodeIsOrContainsYield($this->node);
    }
Check if this function can be used as a generator (i.e. contains the
"yield" keyword).