src/Internal/GeneratorContainer.php
public function getReturnOrThrown()
    {
        $this->validateInvalidity();
        if ($this->e === null && $this->g->valid() && !$this->valid()) {
            return $this->g->current();
        }
        if ($this->e) {
            return $this->e;
        }
        return method_exists($this->g, 'getReturn') ? $this->g->getReturn() : null;
    }
public function getReturnOrThrown()
    {
        $this->validateInvalidity();
        if ($this->e === null && $this->g->valid() && !$this->valid()) {
            return $this->g->current();
        }
        if ($this->e) {
            return $this->e;
        }
        return method_exists($this->g, 'getReturn') ? $this->g->getReturn() : null;
    }
public function getReturnOrThrown ( ) { $ this -> validateInvalidity ( ) ; if ( $ this -> e === null && $ this -> g -> valid ( ) && ! $ this -> valid ( ) ) { return $ this -> g -> current ( ) ; } if ( $ this -> e ) { return $ this -> e ; } return method_exists ( $ this -> g , 'getReturn' ) ? $ this -> g -> getReturn ( ) : null ; }
Return value that generator has returned or thrown.
@return mixed
Return value that generator has returned or thrown .