classJsonReporter
final class JsonReporter
implements Reporter
Public API: explicitly declared with
@visibility public.Encodes candidate values and their ordered evidence paths for command consumers.
$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): stringShared residual nodes use references; evidence is listed once per derivation path.
Parameters
$candidates | CandidateCollection |
Returns
stringThrows
ReportingException If a PHP value cannot be represented by JSONTest cases 4
Calls 5
- function-call
array_mapline 36 - method-call TermGraph::encode() line 40
- new TermGraph line 40
- function-call
json_encodeline 43 - new ReportingException line 45
Test cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.