final class FieldSections

Reads the bold field sections that end a card, such as tests or reason.

"unsupport reason", "unsupported reason" and "rationale" are spellings of the reason field.

Methods§

public function __construct(private Presentation $presentation)

Parameters

$presentationPresentationReceives the link targets, label badges and references of each field
public function read(stdClass $item, list<Node> $blocks, string $file, string $id): void

Reads every field section of a card.

Parameters

$itemstdClassThe item being read
$blockslist<Node>The blocks after the evidence quotations
$filestringThe definition file
$idstringThe item ID

Throws

InvalidInputException When content precedes the first field heading or a field is malformed or repeated
Test cases 6
Called from 1
Calls 3
public function assign(
    stdClass $item,
    string $name,
    list<Node> $nodes,
    string $file,
    string $id,
): void

Reads one field section into the item.

Parameters

$itemstdClassThe item being read
$namestringThe field name
$nodeslist<Node>The blocks of the section
$filestringThe definition file
$idstringThe item ID

Throws

InvalidInputException When the field repeats or its value is malformed
Test cases 3
Called from 2
Calls 5

Private surface 1§

Implementation details, listed for orientation only.

private Presentation $presentation

Test cases 16§

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

Dedicated tests 9
Other tests reaching this symbol 7

Relations§

Instantiated in 1
Method calls 1