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

The runs of statements a branching statement can take.

An if, a switch and a try each run one of several lists of statements. Each list is one arm; an arm that cannot fall through to the next statement is left out, since it cannot be the one taken on the way to anything after it.

Methods§

public function of(Stmt $statement): list<list<Stmt>>|null

The runs of statements a branching statement may have taken, or null when it does not branch.

An arm that cannot finish — it returns, throws, breaks or continues — cannot have been the one taken on the way to a statement after it, so only the arms that fall through are kept.

Parameters

$statementStmt

Returns

list<list<Stmt>>|null
Test cases 2
Called from 1
Calls 6
public function ifArms(If_ $statement): list<list<Stmt>>

The arms of a conditional, with the empty arm taken when no condition holds.

Parameters

$statementIf_

Returns

list<list<Stmt>>
Test cases 1
Called from 1
Calls 1
public function switchArms(Switch_ $statement): list<list<Stmt>>

The arms of a switch, each without the break that ends it.

Parameters

$statementSwitch_

Returns

list<list<Stmt>>
Test cases 2
Called from 1
Calls 3
public function tryArms(TryCatch $statement): list<list<Stmt>>

The runs of a try statement: the try block, or one of its handlers, each followed by the finally block.

Parameters

$statementTryCatch

Returns

list<list<Stmt>>
Test cases 1
Called from 1
Calls 2
public function completes(list<Stmt> $statements): bool

Whether a run of statements can finish and let the next statement run.

Parameters

$statementslist<Stmt>

Returns

bool
Test cases 2
Called from 1
Calls 1

Test cases 14§

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

Dedicated tests 8
Other tests reaching this symbol 6

Relations§

Instantiated in 1
Method calls 1
Type declarations 1