final class RelationCounts
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

Chooses child row counts within a relation cardinality.

Methods§

public function __construct(private Generator $faker)

Draws counts from the same source as fixture generation.

Parameters

$fakerGenerator
public function resolveCount(RowSpec $spec, Relation $relation): int

Chooses a child count within the relation bounds unless explicitly overridden.

Parameters

$specRowSpec
$relationRelation

Returns

int
Test cases 1
Called from 1
Calls 4

Private surface 2§

Implementation details, listed for orientation only.

private const DEFAULT_SPREAD = 4
private Generator $faker

Test cases 7§

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

Dedicated tests 1
Other tests reaching this symbol 6

Relations§

Instantiated in 1
Method calls 1