Skip to content

Commit 1648f00

Browse files
committed
Document StatementContext
1 parent 2c4c0cd commit 1648f00

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Analyser/StatementContext.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
namespace PHPStan\Analyser;
44

5+
/**
6+
* Object of this class is one of the parameters of `NodeScopeResolver::processStmtNodes()`.
7+
*
8+
* It determines whether loops will be analysed once or multiple times
9+
* until the types "stabilize".
10+
*
11+
* When in doubt, use `StatementContext::createTopLevel()`.
12+
*/
513
final class StatementContext
614
{
715

@@ -11,11 +19,17 @@ private function __construct(
1119
{
1220
}
1321

22+
/**
23+
* @api
24+
*/
1425
public static function createTopLevel(): self
1526
{
1627
return new self(true);
1728
}
1829

30+
/**
31+
* @api
32+
*/
1933
public static function createDeep(): self
2034
{
2135
return new self(false);

0 commit comments

Comments
 (0)