/
FunctionDocblockComment.php
177 lines (137 loc) · 3.74 KB
/
FunctionDocblockComment.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<?php
namespace Psalm\Internal\Scanner;
/**
* @internal
*/
class FunctionDocblockComment
{
public ?string $return_type = null;
public ?string $return_type_description = null;
public ?int $return_type_start = null;
public ?int $return_type_end = null;
public ?int $return_type_line_number = null;
/**
* @var array<
* int,
* array{
* name:string,
* type:string,
* line_number: int,
* start: int,
* end: int,
* description?: string
* }
* >
*/
public array $params = [];
/**
* @var array<int, array{name:string, type:string, line_number: int}>
*/
public array $params_out = [];
/**
* @var array{type:string, line_number: int}|null
*/
public ?array $self_out = null;
/**
* @var array{type:string, line_number: int}|null
*/
public ?array $if_this_is = null;
/**
* @var array<int, array{name:string, type:string, line_number: int}>
*/
public array $globals = [];
/**
* Whether or not the function is deprecated
*/
public bool $deprecated = false;
/**
* If set, the function is internal to the given namespace.
*
* @var list<non-empty-string>
*/
public array $psalm_internal = [];
/**
* Whether or not the function is internal
*/
public bool $internal = false;
/**
* Whether or not the function uses get_args
*/
public bool $variadic = false;
/**
* Whether or not the function is pure
*/
public bool $pure = false;
/**
* Whether or not to specialize a given call (useful for taint analysis)
*/
public bool $specialize_call = false;
/**
* Represents the flow from function params to return type
*
* @var array<string>
*/
public array $flows = [];
/**
* @var array<string>
*/
public array $added_taints = [];
/**
* @var array<string>
*/
public array $removed_taints = [];
/**
* @var array<int, array{name:string, taint: string}>
*/
public array $taint_sink_params = [];
/**
* @var array<string>
*/
public array $taint_source_types = [];
/**
* @var array<int, array{name:string}>
*/
public array $assert_untainted_params = [];
/**
* Whether or not to ignore the nullability of this function's return type
*/
public bool $ignore_nullable_return = false;
/**
* Whether or not to ignore the nullability of this function's return type
*/
public bool $ignore_falsable_return = false;
/**
* @var array<int, string>
*/
public array $suppressed_issues = [];
/**
* @var array<int, array{0: string, 1: int, 2: int}>
*/
public array $throws = [];
/**
* @var array<int, array{string, ?string, ?string, bool}>
*/
public array $templates = [];
/**
* @var array<int, array{type: string, param_name: string}>
*/
public array $assertions = [];
/**
* @var array<int, array{type: string, param_name: string}>
*/
public array $if_true_assertions = [];
/**
* @var array<int, array{type: string, param_name: string}>
*/
public array $if_false_assertions = [];
public bool $inheritdoc = false;
public bool $mutation_free = false;
public bool $external_mutation_free = false;
public bool $no_named_args = false;
public bool $stub_override = false;
public int $since_php_major_version = 0;
public int $since_php_minor_version = 0;
public ?string $description = null;
/** @var array<string, array{lines:list<int>, suggested_replacement?:string}> */
public array $unexpected_tags = [];
}