src/Stub/StubData.php
public function generates(...$values): GeneratorAnswerBuilder
    {
        $builder = $this->generatorAnswerBuilderFactory->create($this);
        $this->doesWith($builder->answer(), [], true, true, false);

        foreach ($values as $index => $subValues) {
            if ($index > 0) {
                $builder->returns();

                $builder = $this->generatorAnswerBuilderFactory->create($this);
                $this->doesWith($builder->answer(), [], true, true, false);
            }

            $builder->yieldsFrom($subValues);
        }

        return $builder;
    }
public function generates(...$values): GeneratorAnswerBuilder
    {
        $builder = $this->generatorAnswerBuilderFactory->create($this);
        $this->doesWith($builder->answer(), [], true, true, false);

        foreach ($values as $index => $subValues) {
            if ($index > 0) {
                $builder->returns();

                $builder = $this->generatorAnswerBuilderFactory->create($this);
                $this->doesWith($builder->answer(), [], true, true, false);
            }

            $builder->yieldsFrom($subValues);
        }

        return $builder;
    }
public function generates ( ... $ values ) : GeneratorAnswerBuilder { $ builder = $ this -> generatorAnswerBuilderFactory -> create ( $ this ) ; $ this -> doesWith ( $ builder -> answer ( ) , [ ] , true , true , false ) ; foreach ( $ values as $ index => $ subValues ) { if ( $ index > 0 ) { $ builder -> returns ( ) ; $ builder = $ this -> generatorAnswerBuilderFactory -> create ( $ this ) ; $ this -> doesWith ( $ builder -> answer ( ) , [ ] , true , true , false ) ; } $ builder -> yieldsFrom ( $ subValues ) ; } return $ builder ; }
Add an answer that returns a generator, and return a builder for
customizing the generator's behavior.

@param mixed<mixed,mixed> ...$values Sets of keys and values to yield.

@return GeneratorAnswerBuilder The answer builder.
Add an answer that returns a generator and return a builder for customizing the generator s behavior .