class RecursionGuard

internal  
 

Prevents infinite recursion when resolving methods/properties through class-reflection extensions. Modeled after PHPStan's RecursionGuard.

Methods

static mixed
run(string $key, callable $callback)

Run the callback, or return null when the key is already running.

Details

at line 29
static mixed run(string $key, callable $callback)

Run the callback, or return null when the key is already running.

Parameters

string $key
callable $callback

Return Value

mixed