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

Audits that a value graph is deeply immutable and made of the closed value domain only.

Every reachable object must be an enum case or an instance of a final class of the admitted namespaces that uses the Snapshot trait and whose properties are all initialised readonly properties. Properties hold null, booleans, integers, strings, arrays without references, or such objects. Floats, closures, resources and classes of any other origin are rejected, whatever interface they implement.

Methods§

public function __construct(private list<string> $namespaces)

Parameters

$namespaceslist<string>The namespace prefixes of the closed value domain
public function objects(object $root): list<object>

Answers every object reachable from a root, the root included, after auditing each.

Parameters

$rootobject

Returns

list<object>

Throws

InvalidConstruction When a reachable value is outside the closed immutable domain
Test cases 7
Called from 6
Calls 10
public function members(object $value): list<ReflectionProperty>

Answers the properties to follow for an object after checking its class is admitted.

Parameters

$valueobject

Returns

list<ReflectionProperty>

Throws

InvalidConstruction When the class is outside the closed immutable domain
Test cases 4
Called from 1
Calls 8

Private surface 2§

Implementation details, listed for orientation only.

private array<class-string, list<ReflectionProperty>> $properties = []
private list<string> $namespaces

Test cases 11§

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

Dedicated tests 8
Other tests reaching this symbol 3

Relations§

Instantiated in 5
Method calls 6