src/QCheck/Generator.php
public static function oneOf()
    {
        $generators = self::getArgs(func_get_args());
        $num = count($generators);
        if ($num < 2) {
            throw new \InvalidArgumentException();
        }
        return self::choose(0, $num - 1)
            ->bind(function ($index) use ($generators) {
                return $generators[$index];
            });
    }
public static function oneOf()
    {
        $generators = self::getArgs(func_get_args());
        $num = count($generators);
        if ($num < 2) {
            throw new \InvalidArgumentException();
        }
        return self::choose(0, $num - 1)
            ->bind(function ($index) use ($generators) {
                return $generators[$index];
            });
    }
public static function oneOf ( ) { $ generators = self :: getArgs ( func_get_args ( ) ) ; $ num = count ( $ generators ) ; if ( $ num < 2 ) { throw new \ InvalidArgumentException ( ) ; } return self :: choose ( 0 , $ num - 1 ) -> bind ( function ( $ index ) use ( $ generators ) { return $ generators [ $ index ] ; } ) ; }
creates a new generator that randomly chooses a value from the list
of provided generators. Shrinks toward earlier generators as well as shrinking
the generated value itself.

Accepts either a variadic number of args or a single array of generators.

Example:
Gen::oneOf(Gen::booleans(), Gen::ints())
Gen::oneOf([Gen::booleans(), Gen::ints()])

@return Generator
creates a new generator that randomly chooses a value from the list of provided generators . Shrinks toward earlier generators as well as shrinking the generated value itself .