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

The identifier a catalogued statement keeps across runs.

The identifier is built from the file, the enclosing function, the database call and the statement shape, and deliberately not from the line number, so that editing unrelated lines of a file does not renumber its catalog. That is what makes two catalogs comparable across a pull request.

Constants§

public const LENGTH = 12

How many hexadecimal characters an identifier keeps.

Methods§

public function compute(CallSite $site, TextPattern $pattern, int $occurrence = 0): string

The identifier of a statement issued at the given site.

Two calls in the same function can produce statements the catalog cannot tell apart — two unreached calls, say, whose text is entirely unknown. The occurrence separates them without bringing the line number back in, so they stay distinct and still survive an edit above them.

Parameters

$siteCallSite
$patternTextPattern
$occurrenceintWhich of the otherwise identical statements this is, counting from zero

Returns

string
Test cases 5
Called from 2
Calls 5

Test cases 12§

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

Dedicated tests 5
Other tests reaching this symbol 7

Relations§

Instantiated in 1
Method calls 2
Type declarations 2