final class ArgumentProblem
    implements Diagnostic
    uses Snapshot
Public API: explicitly declared with @visibility public.

Arguments named in a way every routine rejects: a positional argument after a named one, or a name used twice.

Describing a repeated parameter namedoctest
(new \SqlSemantics\Platform\PostgreSql\Statement\Invocation\Problem\ArgumentProblem(
        \SqlSemantics\Platform\PostgreSql\Statement\Invocation\Problem\ArgumentProblemKind::RepeatedName,
        new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('a'),
    ))->message() // => 'argument name "a" used more than once'

Properties§

public Name $argument

Methods§

public function __construct(public ArgumentProblemKind $kind, public Name $argument)

Parameters

$kindArgumentProblemKindThe mistake
$argumentNameThe argument concerned: the repeated name, or the name before the positional argument
public function message(): string

Describes the problem as the server does.

Returns

string
Test cases 1
Calls 1

Test cases 2§

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

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 2