/
FunctionCallInfo.php
63 lines (47 loc) · 1.21 KB
/
FunctionCallInfo.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
namespace Psalm\Internal\Analyzer\Statements\Expression\Call;
use PhpParser;
use Psalm\Storage\FunctionLikeParameter;
use Psalm\Storage\FunctionLikeStorage;
use Psalm\Type\Union;
/**
* @internal
*/
class FunctionCallInfo
{
public ?string $function_id = null;
public ?bool $function_exists = null;
public bool $is_stubbed = false;
public bool $in_call_map = false;
/**
* @var array<string, Union>
*/
public array $defined_constants = [];
/**
* @var array<string, bool>
*/
public array $global_variables = [];
/**
* @var ?array<int, FunctionLikeParameter>
*/
public ?array $function_params = null;
public ?FunctionLikeStorage $function_storage = null;
public ?PhpParser\Node\Name $new_function_name = null;
public bool $allow_named_args = true;
public array $byref_uses = [];
/**
* @mutation-free
*/
public function hasByReferenceParameters(): bool
{
if (null === $this->function_params) {
return false;
}
foreach ($this->function_params as $value) {
if ($value->by_ref) {
return true;
}
}
return false;
}
}