Documentation

GeneratorUtil
in package

Table of Contents

empty()  : Generator
Returns a generator that yields nothing and returns $ret
throw()  : Generator
Returns a generator that yields nothing and throws $throwable

Methods

empty()

Returns a generator that yields nothing and returns $ret

public static empty([mixed $ret = null ]) : Generator
Parameters
$ret : mixed = null
Tags
template

T

phpstan-param

T $ret

phpstan-return

Generator<never, never, never, T>

Return values
Generator

throw()

Returns a generator that yields nothing and throws $throwable

public static throw(Throwable $throwable) : Generator
Parameters
$throwable : Throwable
Tags
template

T of Throwable

throws
Throwable
throws
T
phpstan-param

T $throwable

phpstan-return

Generator<never, never, never, never>

Return values
Generator

Search results