final class ForeignKeyEnds

Answers which columns of the parent a foreign key points at.

A key may name them, or leave them out and mean the parent's primary key, so the two spellings are resolved to one answer here rather than at every place that has to follow the key.

Methods§

public function areBalanced(ForeignKeyDefinition $foreignKey): bool

Reports whether a key names as many parent columns as child columns.

A key that does not cannot be followed at all: there is no pairing to read the child values against.

Parameters

$foreignKeyForeignKeyDefinitionKey to test

Returns

bool True when the two ends have the same number of columns
Test cases 2
Called from 2
Calls 2

Private surface 1§

Implementation details, listed for orientation only.

private TableDefinitionRegistry $registry

Test cases 26§

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

Dedicated tests 5
Other tests reaching this symbol 21

Relations§

Instantiated in 1
Method calls 5
Type declarations 2