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

The analyzed PHP source, with numbered lines and the database calls marked.

Constants§

public const CONTEXT = 8

The lines shown before and after a call on its statement page.

Methods§

public function __construct(?HtmlText $text = null)

Wires source rendering to the escaping used throughout the report.

Parameters

$text?HtmlText
Calls 1
public function file(ReportSite $site, string $file): string

A file's complete source, including files that could not be parsed.

Parameters

$siteReportSite
$filestring

Returns

string
Test cases 1
Called from 1
Calls 4
public function lines(
    list<string> $lines,
    int $first,
    list<int> $calls,
    string $target = '',
): string

Source lines with their original indentation, escaped before embedding.

Parameters

$lineslist<string>
$firstint
$callslist<int>The line numbers to highlight
$targetstringThe full source page, or empty for links within this page

Returns

string
Test cases 1
Called from 2
Calls 3
public function split(string $source): list<string>

Lines split using PHP's newline conventions, retaining a trailing empty line.

Parameters

$sourcestring

Returns

list<string>
Test cases 1
Called from 2
Calls 2

Private surface 1§

Implementation details, listed for orientation only.

private HtmlText $text

Test cases 9§

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

Dedicated tests 6
Other tests reaching this symbol 3

Relations§

Instantiated in 2
Method calls 2