final class Item

A requirement or specification with its source evidence, links and disposition.

Requirements are optional upstream records quoted from a source; specifications are EARS statements that claim evidence directly or through requirements, link tests, or declare an independent origin with a reason.

Properties§

public string $id
public string $kind
public string $statement
public string $status
public Source|null $source
public list<Excerpt> $evidence
public list<TestReference> $tests
public list<string> $requirements
public list<string> $related
public list<string> $labels
public string $category
public string $origin
public string $reason
public string $file
public array<string, mixed> $data

Methods§

public function __construct(
    public string $id,
    public string $kind,
    public string $statement,
    public string $status,
    public Source|null $source,
    public list<Excerpt> $evidence,
    public list<TestReference> $tests,
    public list<string> $requirements,
    public list<string> $related,
    public list<string> $labels,
    public string $category,
    public string $origin,
    public string $reason,
    public string $file,
    public array<string, mixed> $data,
)

Parameters

$idstringThe item ID
$kindstring"requirement" or "specification"
$statementstringThe requirement text or EARS statement
$statusstring"supported" or "unsupported"
$sourceSource|nullThe source of the item's definition file
$evidencelist<Excerpt>The quoted source units
$testslist<TestReference>The linked tests
$requirementslist<string>The IDs of the requirements it refines
$relatedlist<string>The IDs of related items
$labelslist<string>Free-form labels
$categorystringThe category, or an empty string
$originstring"sourced", "original" or "undocumented"
$reasonstringWhy the item is unsupported or independent
$filestringThe definition file declaring the item
$dataarray<string, mixed>The item as written, including design and metadata
public static function from(mixed $value, Source|null $source, string $file): self

Reads and validates an item of a definition.

Parameters

$valuemixedThe decoded item
$sourceSource|nullThe source of the definition file
$filestringThe definition file

Returns

self The item

Throws

InvalidInputException When a field is invalid or the item breaks a disposition rule
Test cases 5
Called from 1
Calls 11

Test cases 76§

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 71

Relations§

Static calls 1
Type declarations 7