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

One call an extension recognises as reaching the database.

The parameter indexes say where the statement text and the bound values sit in the argument list, which is all the analyzer needs in order to treat a framework's own API the same way it treats a raw driver call.

Properties§

public ?int $sqlParameter

SQL argument position, or the fixed SQL output position for a modelled sink.

public ?int $valuesParameter

Bindings argument position, or the fixed bindings output position for a modelled sink.

public string $id
public SinkCallKind $callKind
public string|null $receiverType
public string $name
public SinkRole $role
public int|null $valuesFrom = null
public int|null $nameParameter = null
public int|null $valueParameter = null
public StatementKind|null $kind = null
public string|null $handleType = null
public string|null $model = null

Methods§

public function __construct(
    public string $id,
    public SinkCallKind $callKind,
    public string|null $receiverType,
    public string $name,
    public SinkRole $role,
    int|null $sqlParameter = null,
    int|null $valuesParameter = null,
    public int|null $valuesFrom = null,
    public int|null $nameParameter = null,
    public int|null $valueParameter = null,
    public StatementKind|null $kind = null,
    public string|null $handleType = null,
    public string|null $model = null,
)

Parameters

$idstringThe identifier reported on matched call sites
$callKindSinkCallKindHow the call is written
$receiverTypestring|nullThe class the call is made on, or null for a free function
$namestringThe method or function name
$roleSinkRoleWhat the call does with the statement
$sqlParameterint|nullWhere the statement text sits in the argument list
$valuesParameterint|nullWhere an array of bound values sits
$valuesFromint|nullWhere variadic bound values start
$nameParameterint|nullWhere the name of a single bound parameter sits
$valueParameterint|nullWhere the value of a single bound parameter sits
$kindStatementKind|nullThe statement kind the call implies, when it implies one
$handleTypestring|nullThe class a preparing call returns, so later binds find the statement
$modelstring|nullThe registered statement model for a modelled execution call
Calls 1
public function matchesName(string $name): bool

Whether the call is written with the given name, ignoring case.

Parameters

$namestring

Returns

bool
Test cases 1
Calls 2

Test cases 53§

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

Dedicated tests 3
Other tests reaching this symbol 50

Relations§

Instantiated in 28
Type declarations 9