-
Notifications
You must be signed in to change notification settings - Fork 426
/
ScopeFactory.php
45 lines (40 loc) · 1.42 KB
/
ScopeFactory.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php declare(strict_types = 1);
namespace PHPStan\Analyser;
use PHPStan\Reflection\FunctionReflection;
use PHPStan\Reflection\MethodReflection;
use PHPStan\Reflection\ParametersAcceptor;
use PHPStan\Type\Type;
interface ScopeFactory
{
/**
* @api
* @param array<string, Type> $constantTypes
* @param VariableTypeHolder[] $variablesTypes
* @param VariableTypeHolder[] $moreSpecificTypes
* @param array<string, ConditionalExpressionHolder[]> $conditionalExpressions
* @param array<string, true> $currentlyAssignedExpressions
* @param array<string, true> $currentlyAllowedUndefinedExpressions
* @param array<string, Type> $nativeExpressionTypes
* @param array<MethodReflection|FunctionReflection> $inFunctionCallsStack
*
*/
public function create(
ScopeContext $context,
bool $declareStrictTypes = false,
array $constantTypes = [],
FunctionReflection|MethodReflection|null $function = null,
?string $namespace = null,
array $variablesTypes = [],
array $moreSpecificTypes = [],
array $conditionalExpressions = [],
?string $inClosureBindScopeClass = null,
?ParametersAcceptor $anonymousFunctionReflection = null,
bool $inFirstLevelStatement = true,
array $currentlyAssignedExpressions = [],
array $currentlyAllowedUndefinedExpressions = [],
array $nativeExpressionTypes = [],
array $inFunctionCallsStack = [],
bool $afterExtractCall = false,
?Scope $parentScope = null,
): MutatingScope;
}