final class FixtureGenerator
    implements RowGeneration

Generates row data and optionally hydrates it into a consumer object.

Methods§

public function __construct(
    private Generator $faker,
    ?TypeMapperInterface $typeMapper = null,
    ?HydratorInterface $hydrator = null,
    ?SchemaParserInterface $schemaParser = null,
)

Initializes the collaborators and declared state for this object.

Parameters

$fakerGenerator
$typeMapper?TypeMapperInterface
$hydrator?HydratorInterface
$schemaParser?SchemaParserInterface
Calls 3
public function generate<T of object>(
    TableSchema $schema,
    array<mixed> $overrides = [],
    class-string<T>|null $className = null,
): ($className is null ? array<string, mixed> : T)
public function getTypeMapper(): TypeMapperInterface
public function getHydrator(): HydratorInterface

Private surface 4§

Implementation details, listed for orientation only.

private TypeMapperInterface $typeMapper
private HydratorInterface $hydrator
private SchemaParserInterface $schemaParser
private Generator $faker

Test cases 57§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 11
Other tests reaching this symbol 46

Relations§

Instantiated in 3
Method calls 4
Type declarations 8