final class JsonReporter
    implements Reporter
Public API: explicitly declared with @visibility public.

Encodes candidate values and their ordered evidence paths for command consumers.

Reporting no candidatesdoctest
$candidates = new \Deriver\Deriver\Candidate\CandidateCollection([], new \Deriver\Deriver\Candidate\ResultRef('r'));
    json_decode((new \Deriver\Reporter\JsonReporter())->report($candidates), true)['candidates'] // => []

Methods§

public function report(CandidateCollection $candidates): string

Shared residual nodes use references; evidence is listed once per derivation path.

Parameters

Returns

string

Throws

ReportingException If a PHP value cannot be represented by JSON
Test cases 4
Calls 5

Test cases 5§

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

Dedicated tests 4
Other tests reaching this symbol 1

Relations§

Instantiated in 1