final class ItemValidator

Enforces the rules an item must satisfy on its own, before links between items are checked.

Methods§

public function validate(Item $item): void

Checks every rule, in the order the messages are reported.

Parameters

$itemItemThe item

Throws

InvalidInputException When the item breaks a rule; the message starts with its ID
Test cases 2
Called from 1
Calls 4
public function identity(Item $item): void

Checks the ID and the kind, status and origin values.

Parameters

$itemItemThe item

Throws

InvalidInputException When the ID is malformed or a value is unknown
Test cases 2
Called from 1
Calls 3
public function statement(Item $item): void

Checks that unsupported items give a reason and specifications follow EARS.

Parameters

$itemItemThe item

Throws

InvalidInputException When the reason is missing or the statement breaks EARS
Test cases 2
Called from 1
Calls 3
public function disposition(Item $item): void

Checks how the item is accounted for: by evidence, by requirements or as independent.

Parameters

$itemItemThe item

Throws

InvalidInputException When the kind, origin, evidence and links contradict each other
Test cases 2
Called from 1
Calls 1
public function details(Item $item): void

Checks the metadata mapping and the design references.

Parameters

$itemItemThe item

Throws

InvalidInputException When metadata is not a mapping or a design reference is empty or unknown
Test cases 2
Called from 1
Calls 6

Test cases 24§

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

Dedicated tests 10
Other tests reaching this symbol 14

Relations§

Instantiated in 1
Method calls 1