@@ -8,26 +8,26 @@ |
||
8 | 8 | */ |
9 | 9 | class ReflectionNamedType extends ReflectionType |
10 | 10 | { |
11 | - /** |
|
12 | - * Get the text of the type hint. |
|
13 | - * |
|
14 | - * @link https://php.net/manual/en/reflectionnamedtype.getname.php |
|
15 | - * @return string Returns the text of the type hint. |
|
16 | - * @since 7.1 |
|
17 | - */ |
|
18 | - #[Pure] |
|
19 | - public function getName() {} |
|
11 | + /** |
|
12 | + * Get the text of the type hint. |
|
13 | + * |
|
14 | + * @link https://php.net/manual/en/reflectionnamedtype.getname.php |
|
15 | + * @return string Returns the text of the type hint. |
|
16 | + * @since 7.1 |
|
17 | + */ |
|
18 | + #[Pure] |
|
19 | + public function getName() {} |
|
20 | 20 | |
21 | - /** |
|
22 | - * Checks if it is a built-in type |
|
23 | - * |
|
24 | - * @link https://php.net/manual/en/reflectiontype.isbuiltin.php |
|
25 | - * @return bool Returns {@see true} if it's a built-in type, otherwise {@see false} |
|
26 | - * |
|
27 | - * @since 7.1 overrides the parent {@see ReflectionType::isBuiltin()} method. |
|
28 | - * @since 8.0 method was removed from the parent {@see ReflectionType} class. |
|
29 | - */ |
|
30 | - #[Pure] |
|
31 | - #[TentativeType] |
|
32 | - public function isBuiltin(): bool {} |
|
21 | + /** |
|
22 | + * Checks if it is a built-in type |
|
23 | + * |
|
24 | + * @link https://php.net/manual/en/reflectiontype.isbuiltin.php |
|
25 | + * @return bool Returns {@see true} if it's a built-in type, otherwise {@see false} |
|
26 | + * |
|
27 | + * @since 7.1 overrides the parent {@see ReflectionType::isBuiltin()} method. |
|
28 | + * @since 8.0 method was removed from the parent {@see ReflectionType} class. |
|
29 | + */ |
|
30 | + #[Pure] |
|
31 | + #[TentativeType] |
|
32 | + public function isBuiltin(): bool {} |
|
33 | 33 | } |
@@ -6,8 +6,7 @@ |
||
6 | 6 | /** |
7 | 7 | * @since 7.1 |
8 | 8 | */ |
9 | -class ReflectionNamedType extends ReflectionType |
|
10 | -{ |
|
9 | +class ReflectionNamedType extends ReflectionType { |
|
11 | 10 | /** |
12 | 11 | * Get the text of the type hint. |
13 | 12 | * |
@@ -15,327 +15,327 @@ |
||
15 | 15 | */ |
16 | 16 | class ReflectionProperty implements Reflector |
17 | 17 | { |
18 | - /** |
|
19 | - * @var string Name of the property, same as calling the {@see ReflectionProperty::getName()} method |
|
20 | - */ |
|
21 | - #[Immutable] |
|
22 | - #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] |
|
23 | - public $name; |
|
24 | - |
|
25 | - /** |
|
26 | - * @var string Fully qualified class name where this property was defined |
|
27 | - */ |
|
28 | - #[Immutable] |
|
29 | - #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] |
|
30 | - public $class; |
|
31 | - |
|
32 | - /** |
|
33 | - * @var bool |
|
34 | - * @since 8.1 |
|
35 | - */ |
|
36 | - #[Immutable] |
|
37 | - public bool $isReadonly; |
|
38 | - |
|
39 | - /** |
|
40 | - * Indicates that the property is static. |
|
41 | - * |
|
42 | - * @link https://www.php.net/manual/en/class.reflectionproperty.php#reflectionproperty.constants.is-static |
|
43 | - */ |
|
44 | - public const IS_STATIC = 16; |
|
45 | - |
|
46 | - /** |
|
47 | - * Indicates that the property is public. |
|
48 | - * |
|
49 | - * @link https://www.php.net/manual/en/class.reflectionproperty.php#reflectionproperty.constants.is-public |
|
50 | - */ |
|
51 | - public const IS_PUBLIC = 1; |
|
52 | - |
|
53 | - /** |
|
54 | - * Indicates that the property is protected. |
|
55 | - * |
|
56 | - * @link https://www.php.net/manual/en/class.reflectionproperty.php#reflectionproperty.constants.is-protected |
|
57 | - */ |
|
58 | - public const IS_PROTECTED = 2; |
|
59 | - |
|
60 | - /** |
|
61 | - * Indicates that the property is private. |
|
62 | - * |
|
63 | - * @link https://www.php.net/manual/en/class.reflectionproperty.php#reflectionproperty.constants.is-private |
|
64 | - */ |
|
65 | - public const IS_PRIVATE = 4; |
|
66 | - |
|
67 | - /** |
|
68 | - * @since 8.1 |
|
69 | - */ |
|
70 | - public const IS_READONLY = 5; |
|
71 | - |
|
72 | - /** |
|
73 | - * Construct a ReflectionProperty object |
|
74 | - * |
|
75 | - * @link https://php.net/manual/en/reflectionproperty.construct.php |
|
76 | - * @param string|object $class The class name, that contains the property. |
|
77 | - * @param string $property The name of the property being reflected. |
|
78 | - * @throws ReflectionException if the class or property does not exist. |
|
79 | - */ |
|
80 | - public function __construct( |
|
81 | - #[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $class, |
|
82 | - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $property |
|
83 | - ) {} |
|
84 | - |
|
85 | - /** |
|
86 | - * Export |
|
87 | - * |
|
88 | - * @link https://php.net/manual/en/reflectionproperty.export.php |
|
89 | - * @param mixed $class The reflection to export. |
|
90 | - * @param string $name The property name. |
|
91 | - * @param bool $return Setting to {@see true} will return the export, as |
|
92 | - * opposed to emitting it. Setting to {@see false} (the default) will do the |
|
93 | - * opposite. |
|
94 | - * @return string|null |
|
95 | - * @removed 8.0 |
|
96 | - */ |
|
97 | - #[Deprecated(since: '7.4')] |
|
98 | - public static function export($class, $name, $return = false) {} |
|
99 | - |
|
100 | - /** |
|
101 | - * To string |
|
102 | - * |
|
103 | - * @link https://php.net/manual/en/reflectionproperty.tostring.php |
|
104 | - * @return string |
|
105 | - */ |
|
106 | - #[TentativeType] |
|
107 | - public function __toString(): string {} |
|
108 | - |
|
109 | - /** |
|
110 | - * Gets property name |
|
111 | - * |
|
112 | - * @link https://php.net/manual/en/reflectionproperty.getname.php |
|
113 | - * @return string The name of the reflected property. |
|
114 | - */ |
|
115 | - #[Pure] |
|
116 | - #[TentativeType] |
|
117 | - public function getName(): string {} |
|
118 | - |
|
119 | - /** |
|
120 | - * Gets value |
|
121 | - * |
|
122 | - * @link https://php.net/manual/en/reflectionproperty.getvalue.php |
|
123 | - * @param object|null $object If the property is non-static an object must be |
|
124 | - * provided to fetch the property from. If you want to fetch the default |
|
125 | - * property without providing an object use {@see ReflectionClass::getDefaultProperties} |
|
126 | - * instead. |
|
127 | - * @return mixed The current value of the property. |
|
128 | - */ |
|
129 | - #[Pure] |
|
130 | - #[TentativeType] |
|
131 | - public function getValue(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object = null): mixed {} |
|
132 | - |
|
133 | - /** |
|
134 | - * Set property value |
|
135 | - * |
|
136 | - * @link https://php.net/manual/en/reflectionproperty.setvalue.php |
|
137 | - * @param mixed $objectOrValue If the property is non-static an object must |
|
138 | - * be provided to change the property on. If the property is static this |
|
139 | - * parameter is left out and only $value needs to be provided. |
|
140 | - * @param mixed $value The new value. |
|
141 | - * @return void No value is returned. |
|
142 | - */ |
|
143 | - #[TentativeType] |
|
144 | - public function setValue( |
|
145 | - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $objectOrValue, |
|
146 | - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value = null |
|
147 | - ): void {} |
|
148 | - |
|
149 | - /** |
|
150 | - * Checks if property is public |
|
151 | - * |
|
152 | - * @link https://php.net/manual/en/reflectionproperty.ispublic.php |
|
153 | - * @return bool Return {@see true} if the property is public, {@see false} otherwise. |
|
154 | - */ |
|
155 | - #[Pure] |
|
156 | - #[TentativeType] |
|
157 | - public function isPublic(): bool {} |
|
158 | - |
|
159 | - /** |
|
160 | - * Checks if property is private |
|
161 | - * |
|
162 | - * @link https://php.net/manual/en/reflectionproperty.isprivate.php |
|
163 | - * @return bool Return {@see true} if the property is private, {@see false} otherwise. |
|
164 | - */ |
|
165 | - #[Pure] |
|
166 | - #[TentativeType] |
|
167 | - public function isPrivate(): bool {} |
|
168 | - |
|
169 | - /** |
|
170 | - * Checks if property is protected |
|
171 | - * |
|
172 | - * @link https://php.net/manual/en/reflectionproperty.isprotected.php |
|
173 | - * @return bool Returns {@see true} if the property is protected, {@see false} otherwise. |
|
174 | - */ |
|
175 | - #[Pure] |
|
176 | - #[TentativeType] |
|
177 | - public function isProtected(): bool {} |
|
178 | - |
|
179 | - /** |
|
180 | - * Checks if property is static |
|
181 | - * |
|
182 | - * @link https://php.net/manual/en/reflectionproperty.isstatic.php |
|
183 | - * @return bool Retruns {@see true} if the property is static, {@see false} otherwise. |
|
184 | - */ |
|
185 | - #[Pure] |
|
186 | - #[TentativeType] |
|
187 | - public function isStatic(): bool {} |
|
188 | - |
|
189 | - /** |
|
190 | - * Checks if default value |
|
191 | - * |
|
192 | - * @link https://php.net/manual/en/reflectionproperty.isdefault.php |
|
193 | - * @return bool Returns {@see true} if the property was declared at |
|
194 | - * compile-time, or {@see false} if it was created at run-time. |
|
195 | - */ |
|
196 | - #[Pure] |
|
197 | - #[TentativeType] |
|
198 | - public function isDefault(): bool {} |
|
199 | - |
|
200 | - /** |
|
201 | - * Gets modifiers |
|
202 | - * |
|
203 | - * @link https://php.net/manual/en/reflectionproperty.getmodifiers.php |
|
204 | - * @return int A numeric representation of the modifiers. |
|
205 | - */ |
|
206 | - #[Pure] |
|
207 | - #[TentativeType] |
|
208 | - public function getModifiers(): int {} |
|
209 | - |
|
210 | - /** |
|
211 | - * Gets declaring class |
|
212 | - * |
|
213 | - * @link https://php.net/manual/en/reflectionproperty.getdeclaringclass.php |
|
214 | - * @return ReflectionClass A {@see ReflectionClass} object. |
|
215 | - */ |
|
216 | - #[Pure] |
|
217 | - #[TentativeType] |
|
218 | - public function getDeclaringClass(): ReflectionClass {} |
|
219 | - |
|
220 | - /** |
|
221 | - * Gets doc comment |
|
222 | - * |
|
223 | - * @link https://php.net/manual/en/reflectionproperty.getdoccomment.php |
|
224 | - * @return string|false The doc comment if it exists, otherwise {@see false} |
|
225 | - */ |
|
226 | - #[Pure] |
|
227 | - #[TentativeType] |
|
228 | - public function getDocComment(): string|false {} |
|
229 | - |
|
230 | - /** |
|
231 | - * Set property accessibility |
|
232 | - * |
|
233 | - * @link https://php.net/manual/en/reflectionproperty.setaccessible.php |
|
234 | - * @param bool $accessible A boolean {@see true} to allow accessibility, or {@see false} |
|
235 | - * @return void No value is returned. |
|
236 | - */ |
|
237 | - #[PhpStormStubsElementAvailable(to: "8.0")] |
|
238 | - #[TentativeType] |
|
239 | - public function setAccessible(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $accessible): void {} |
|
240 | - |
|
241 | - /** |
|
242 | - * Set property accessibility |
|
243 | - * This method is no-op starting from PHP 8.1 |
|
244 | - * |
|
245 | - * @link https://php.net/manual/en/reflectionproperty.setaccessible.php |
|
246 | - * @param bool $accessible A boolean {@see true} to allow accessibility, or {@see false} |
|
247 | - * @return void No value is returned. |
|
248 | - */ |
|
249 | - #[Pure] |
|
250 | - #[PhpStormStubsElementAvailable(from: "8.1")] |
|
251 | - #[TentativeType] |
|
252 | - public function setAccessible(bool $accessible): void {} |
|
253 | - |
|
254 | - /** |
|
255 | - * Gets property type |
|
256 | - * |
|
257 | - * @link https://php.net/manual/en/reflectionproperty.gettype.php |
|
258 | - * @return ReflectionNamedType|ReflectionUnionType|null Returns a {@see ReflectionType} if the |
|
259 | - * property has a type, and {@see null} otherwise. |
|
260 | - * @since 7.4 |
|
261 | - */ |
|
262 | - #[Pure] |
|
263 | - #[LanguageLevelTypeAware( |
|
264 | - [ |
|
265 | - '8.0' => 'ReflectionNamedType|ReflectionUnionType|null', |
|
266 | - '8.1' => 'ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null' |
|
267 | - ], |
|
268 | - default: 'ReflectionNamedType|null' |
|
269 | - )] |
|
270 | - #[TentativeType] |
|
271 | - public function getType(): ?ReflectionType {} |
|
272 | - |
|
273 | - /** |
|
274 | - * Checks if property has type |
|
275 | - * |
|
276 | - * @link https://php.net/manual/en/reflectionproperty.hastype.php |
|
277 | - * @return bool Returns {@see true} if a type is specified, {@see false} otherwise. |
|
278 | - * @since 7.4 |
|
279 | - */ |
|
280 | - #[TentativeType] |
|
281 | - public function hasType(): bool {} |
|
282 | - |
|
283 | - /** |
|
284 | - * Checks if property is initialized |
|
285 | - * |
|
286 | - * @link https://php.net/manual/en/reflectionproperty.isinitialized.php |
|
287 | - * @param object|null $object If the property is non-static an object must be provided to fetch the property from. |
|
288 | - * @return bool Returns {@see false} for typed properties prior to initialization, and for properties that have |
|
289 | - * been explicitly {@see unset()}. For all other properties {@see true} will be returned. |
|
290 | - * @since 7.4 |
|
291 | - */ |
|
292 | - #[Pure] |
|
293 | - #[TentativeType] |
|
294 | - public function isInitialized(?object $object = null): bool {} |
|
295 | - |
|
296 | - /** |
|
297 | - * Returns information about whether the property was promoted. |
|
298 | - * |
|
299 | - * @return bool Returns {@see true} if the property was promoted or {@see false} instead. |
|
300 | - * @since 8.0 |
|
301 | - */ |
|
302 | - #[Pure] |
|
303 | - public function isPromoted(): bool {} |
|
304 | - |
|
305 | - /** |
|
306 | - * Clone |
|
307 | - * |
|
308 | - * @link https://php.net/manual/en/reflectionproperty.clone.php |
|
309 | - * @return void |
|
310 | - */ |
|
311 | - final private function __clone(): void {} |
|
312 | - |
|
313 | - /** |
|
314 | - * @return bool |
|
315 | - * @since 8.0 |
|
316 | - */ |
|
317 | - public function hasDefaultValue(): bool {} |
|
318 | - |
|
319 | - /** |
|
320 | - * @return mixed |
|
321 | - * @since 8.0 |
|
322 | - */ |
|
323 | - #[Pure] |
|
324 | - #[TentativeType] |
|
325 | - public function getDefaultValue(): mixed {} |
|
326 | - |
|
327 | - /** |
|
328 | - * @param null|string $name |
|
329 | - * @param int $flags |
|
330 | - * @return ReflectionAttribute[] |
|
331 | - * @since 8.0 |
|
332 | - */ |
|
333 | - #[Pure] |
|
334 | - public function getAttributes(?string $name = null, int $flags = 0): array {} |
|
335 | - |
|
336 | - /** |
|
337 | - * @return bool |
|
338 | - * @since 8.1 |
|
339 | - */ |
|
340 | - public function isReadOnly(): bool {} |
|
18 | + /** |
|
19 | + * @var string Name of the property, same as calling the {@see ReflectionProperty::getName()} method |
|
20 | + */ |
|
21 | + #[Immutable] |
|
22 | + #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] |
|
23 | + public $name; |
|
24 | + |
|
25 | + /** |
|
26 | + * @var string Fully qualified class name where this property was defined |
|
27 | + */ |
|
28 | + #[Immutable] |
|
29 | + #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] |
|
30 | + public $class; |
|
31 | + |
|
32 | + /** |
|
33 | + * @var bool |
|
34 | + * @since 8.1 |
|
35 | + */ |
|
36 | + #[Immutable] |
|
37 | + public bool $isReadonly; |
|
38 | + |
|
39 | + /** |
|
40 | + * Indicates that the property is static. |
|
41 | + * |
|
42 | + * @link https://www.php.net/manual/en/class.reflectionproperty.php#reflectionproperty.constants.is-static |
|
43 | + */ |
|
44 | + public const IS_STATIC = 16; |
|
45 | + |
|
46 | + /** |
|
47 | + * Indicates that the property is public. |
|
48 | + * |
|
49 | + * @link https://www.php.net/manual/en/class.reflectionproperty.php#reflectionproperty.constants.is-public |
|
50 | + */ |
|
51 | + public const IS_PUBLIC = 1; |
|
52 | + |
|
53 | + /** |
|
54 | + * Indicates that the property is protected. |
|
55 | + * |
|
56 | + * @link https://www.php.net/manual/en/class.reflectionproperty.php#reflectionproperty.constants.is-protected |
|
57 | + */ |
|
58 | + public const IS_PROTECTED = 2; |
|
59 | + |
|
60 | + /** |
|
61 | + * Indicates that the property is private. |
|
62 | + * |
|
63 | + * @link https://www.php.net/manual/en/class.reflectionproperty.php#reflectionproperty.constants.is-private |
|
64 | + */ |
|
65 | + public const IS_PRIVATE = 4; |
|
66 | + |
|
67 | + /** |
|
68 | + * @since 8.1 |
|
69 | + */ |
|
70 | + public const IS_READONLY = 5; |
|
71 | + |
|
72 | + /** |
|
73 | + * Construct a ReflectionProperty object |
|
74 | + * |
|
75 | + * @link https://php.net/manual/en/reflectionproperty.construct.php |
|
76 | + * @param string|object $class The class name, that contains the property. |
|
77 | + * @param string $property The name of the property being reflected. |
|
78 | + * @throws ReflectionException if the class or property does not exist. |
|
79 | + */ |
|
80 | + public function __construct( |
|
81 | + #[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $class, |
|
82 | + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $property |
|
83 | + ) {} |
|
84 | + |
|
85 | + /** |
|
86 | + * Export |
|
87 | + * |
|
88 | + * @link https://php.net/manual/en/reflectionproperty.export.php |
|
89 | + * @param mixed $class The reflection to export. |
|
90 | + * @param string $name The property name. |
|
91 | + * @param bool $return Setting to {@see true} will return the export, as |
|
92 | + * opposed to emitting it. Setting to {@see false} (the default) will do the |
|
93 | + * opposite. |
|
94 | + * @return string|null |
|
95 | + * @removed 8.0 |
|
96 | + */ |
|
97 | + #[Deprecated(since: '7.4')] |
|
98 | + public static function export($class, $name, $return = false) {} |
|
99 | + |
|
100 | + /** |
|
101 | + * To string |
|
102 | + * |
|
103 | + * @link https://php.net/manual/en/reflectionproperty.tostring.php |
|
104 | + * @return string |
|
105 | + */ |
|
106 | + #[TentativeType] |
|
107 | + public function __toString(): string {} |
|
108 | + |
|
109 | + /** |
|
110 | + * Gets property name |
|
111 | + * |
|
112 | + * @link https://php.net/manual/en/reflectionproperty.getname.php |
|
113 | + * @return string The name of the reflected property. |
|
114 | + */ |
|
115 | + #[Pure] |
|
116 | + #[TentativeType] |
|
117 | + public function getName(): string {} |
|
118 | + |
|
119 | + /** |
|
120 | + * Gets value |
|
121 | + * |
|
122 | + * @link https://php.net/manual/en/reflectionproperty.getvalue.php |
|
123 | + * @param object|null $object If the property is non-static an object must be |
|
124 | + * provided to fetch the property from. If you want to fetch the default |
|
125 | + * property without providing an object use {@see ReflectionClass::getDefaultProperties} |
|
126 | + * instead. |
|
127 | + * @return mixed The current value of the property. |
|
128 | + */ |
|
129 | + #[Pure] |
|
130 | + #[TentativeType] |
|
131 | + public function getValue(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object = null): mixed {} |
|
132 | + |
|
133 | + /** |
|
134 | + * Set property value |
|
135 | + * |
|
136 | + * @link https://php.net/manual/en/reflectionproperty.setvalue.php |
|
137 | + * @param mixed $objectOrValue If the property is non-static an object must |
|
138 | + * be provided to change the property on. If the property is static this |
|
139 | + * parameter is left out and only $value needs to be provided. |
|
140 | + * @param mixed $value The new value. |
|
141 | + * @return void No value is returned. |
|
142 | + */ |
|
143 | + #[TentativeType] |
|
144 | + public function setValue( |
|
145 | + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $objectOrValue, |
|
146 | + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value = null |
|
147 | + ): void {} |
|
148 | + |
|
149 | + /** |
|
150 | + * Checks if property is public |
|
151 | + * |
|
152 | + * @link https://php.net/manual/en/reflectionproperty.ispublic.php |
|
153 | + * @return bool Return {@see true} if the property is public, {@see false} otherwise. |
|
154 | + */ |
|
155 | + #[Pure] |
|
156 | + #[TentativeType] |
|
157 | + public function isPublic(): bool {} |
|
158 | + |
|
159 | + /** |
|
160 | + * Checks if property is private |
|
161 | + * |
|
162 | + * @link https://php.net/manual/en/reflectionproperty.isprivate.php |
|
163 | + * @return bool Return {@see true} if the property is private, {@see false} otherwise. |
|
164 | + */ |
|
165 | + #[Pure] |
|
166 | + #[TentativeType] |
|
167 | + public function isPrivate(): bool {} |
|
168 | + |
|
169 | + /** |
|
170 | + * Checks if property is protected |
|
171 | + * |
|
172 | + * @link https://php.net/manual/en/reflectionproperty.isprotected.php |
|
173 | + * @return bool Returns {@see true} if the property is protected, {@see false} otherwise. |
|
174 | + */ |
|
175 | + #[Pure] |
|
176 | + #[TentativeType] |
|
177 | + public function isProtected(): bool {} |
|
178 | + |
|
179 | + /** |
|
180 | + * Checks if property is static |
|
181 | + * |
|
182 | + * @link https://php.net/manual/en/reflectionproperty.isstatic.php |
|
183 | + * @return bool Retruns {@see true} if the property is static, {@see false} otherwise. |
|
184 | + */ |
|
185 | + #[Pure] |
|
186 | + #[TentativeType] |
|
187 | + public function isStatic(): bool {} |
|
188 | + |
|
189 | + /** |
|
190 | + * Checks if default value |
|
191 | + * |
|
192 | + * @link https://php.net/manual/en/reflectionproperty.isdefault.php |
|
193 | + * @return bool Returns {@see true} if the property was declared at |
|
194 | + * compile-time, or {@see false} if it was created at run-time. |
|
195 | + */ |
|
196 | + #[Pure] |
|
197 | + #[TentativeType] |
|
198 | + public function isDefault(): bool {} |
|
199 | + |
|
200 | + /** |
|
201 | + * Gets modifiers |
|
202 | + * |
|
203 | + * @link https://php.net/manual/en/reflectionproperty.getmodifiers.php |
|
204 | + * @return int A numeric representation of the modifiers. |
|
205 | + */ |
|
206 | + #[Pure] |
|
207 | + #[TentativeType] |
|
208 | + public function getModifiers(): int {} |
|
209 | + |
|
210 | + /** |
|
211 | + * Gets declaring class |
|
212 | + * |
|
213 | + * @link https://php.net/manual/en/reflectionproperty.getdeclaringclass.php |
|
214 | + * @return ReflectionClass A {@see ReflectionClass} object. |
|
215 | + */ |
|
216 | + #[Pure] |
|
217 | + #[TentativeType] |
|
218 | + public function getDeclaringClass(): ReflectionClass {} |
|
219 | + |
|
220 | + /** |
|
221 | + * Gets doc comment |
|
222 | + * |
|
223 | + * @link https://php.net/manual/en/reflectionproperty.getdoccomment.php |
|
224 | + * @return string|false The doc comment if it exists, otherwise {@see false} |
|
225 | + */ |
|
226 | + #[Pure] |
|
227 | + #[TentativeType] |
|
228 | + public function getDocComment(): string|false {} |
|
229 | + |
|
230 | + /** |
|
231 | + * Set property accessibility |
|
232 | + * |
|
233 | + * @link https://php.net/manual/en/reflectionproperty.setaccessible.php |
|
234 | + * @param bool $accessible A boolean {@see true} to allow accessibility, or {@see false} |
|
235 | + * @return void No value is returned. |
|
236 | + */ |
|
237 | + #[PhpStormStubsElementAvailable(to: "8.0")] |
|
238 | + #[TentativeType] |
|
239 | + public function setAccessible(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $accessible): void {} |
|
240 | + |
|
241 | + /** |
|
242 | + * Set property accessibility |
|
243 | + * This method is no-op starting from PHP 8.1 |
|
244 | + * |
|
245 | + * @link https://php.net/manual/en/reflectionproperty.setaccessible.php |
|
246 | + * @param bool $accessible A boolean {@see true} to allow accessibility, or {@see false} |
|
247 | + * @return void No value is returned. |
|
248 | + */ |
|
249 | + #[Pure] |
|
250 | + #[PhpStormStubsElementAvailable(from: "8.1")] |
|
251 | + #[TentativeType] |
|
252 | + public function setAccessible(bool $accessible): void {} |
|
253 | + |
|
254 | + /** |
|
255 | + * Gets property type |
|
256 | + * |
|
257 | + * @link https://php.net/manual/en/reflectionproperty.gettype.php |
|
258 | + * @return ReflectionNamedType|ReflectionUnionType|null Returns a {@see ReflectionType} if the |
|
259 | + * property has a type, and {@see null} otherwise. |
|
260 | + * @since 7.4 |
|
261 | + */ |
|
262 | + #[Pure] |
|
263 | + #[LanguageLevelTypeAware( |
|
264 | + [ |
|
265 | + '8.0' => 'ReflectionNamedType|ReflectionUnionType|null', |
|
266 | + '8.1' => 'ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null' |
|
267 | + ], |
|
268 | + default: 'ReflectionNamedType|null' |
|
269 | + )] |
|
270 | + #[TentativeType] |
|
271 | + public function getType(): ?ReflectionType {} |
|
272 | + |
|
273 | + /** |
|
274 | + * Checks if property has type |
|
275 | + * |
|
276 | + * @link https://php.net/manual/en/reflectionproperty.hastype.php |
|
277 | + * @return bool Returns {@see true} if a type is specified, {@see false} otherwise. |
|
278 | + * @since 7.4 |
|
279 | + */ |
|
280 | + #[TentativeType] |
|
281 | + public function hasType(): bool {} |
|
282 | + |
|
283 | + /** |
|
284 | + * Checks if property is initialized |
|
285 | + * |
|
286 | + * @link https://php.net/manual/en/reflectionproperty.isinitialized.php |
|
287 | + * @param object|null $object If the property is non-static an object must be provided to fetch the property from. |
|
288 | + * @return bool Returns {@see false} for typed properties prior to initialization, and for properties that have |
|
289 | + * been explicitly {@see unset()}. For all other properties {@see true} will be returned. |
|
290 | + * @since 7.4 |
|
291 | + */ |
|
292 | + #[Pure] |
|
293 | + #[TentativeType] |
|
294 | + public function isInitialized(?object $object = null): bool {} |
|
295 | + |
|
296 | + /** |
|
297 | + * Returns information about whether the property was promoted. |
|
298 | + * |
|
299 | + * @return bool Returns {@see true} if the property was promoted or {@see false} instead. |
|
300 | + * @since 8.0 |
|
301 | + */ |
|
302 | + #[Pure] |
|
303 | + public function isPromoted(): bool {} |
|
304 | + |
|
305 | + /** |
|
306 | + * Clone |
|
307 | + * |
|
308 | + * @link https://php.net/manual/en/reflectionproperty.clone.php |
|
309 | + * @return void |
|
310 | + */ |
|
311 | + final private function __clone(): void {} |
|
312 | + |
|
313 | + /** |
|
314 | + * @return bool |
|
315 | + * @since 8.0 |
|
316 | + */ |
|
317 | + public function hasDefaultValue(): bool {} |
|
318 | + |
|
319 | + /** |
|
320 | + * @return mixed |
|
321 | + * @since 8.0 |
|
322 | + */ |
|
323 | + #[Pure] |
|
324 | + #[TentativeType] |
|
325 | + public function getDefaultValue(): mixed {} |
|
326 | + |
|
327 | + /** |
|
328 | + * @param null|string $name |
|
329 | + * @param int $flags |
|
330 | + * @return ReflectionAttribute[] |
|
331 | + * @since 8.0 |
|
332 | + */ |
|
333 | + #[Pure] |
|
334 | + public function getAttributes(?string $name = null, int $flags = 0): array {} |
|
335 | + |
|
336 | + /** |
|
337 | + * @return bool |
|
338 | + * @since 8.1 |
|
339 | + */ |
|
340 | + public function isReadOnly(): bool {} |
|
341 | 341 | } |
@@ -225,7 +225,7 @@ |
||
225 | 225 | */ |
226 | 226 | #[Pure] |
227 | 227 | #[TentativeType] |
228 | - public function getDocComment(): string|false {} |
|
228 | + public function getDocComment(): string | false {} |
|
229 | 229 | |
230 | 230 | /** |
231 | 231 | * Set property accessibility |
@@ -13,8 +13,7 @@ |
||
13 | 13 | * |
14 | 14 | * @link https://php.net/manual/en/class.reflectionproperty.php |
15 | 15 | */ |
16 | -class ReflectionProperty implements Reflector |
|
17 | -{ |
|
16 | +class ReflectionProperty implements Reflector { |
|
18 | 17 | /** |
19 | 18 | * @var string Name of the property, same as calling the {@see ReflectionProperty::getName()} method |
20 | 19 | */ |
@@ -14,652 +14,652 @@ |
||
14 | 14 | */ |
15 | 15 | class ReflectionClass implements Reflector |
16 | 16 | { |
17 | - /** |
|
18 | - * @var string Name of the class, same as calling the {@see ReflectionClass::getName()} method |
|
19 | - */ |
|
20 | - #[Immutable] |
|
21 | - #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] |
|
22 | - public $name; |
|
23 | - |
|
24 | - /** |
|
25 | - * Indicates class that is abstract because it has some abstract methods. |
|
26 | - * |
|
27 | - * @link https://www.php.net/manual/en/class.reflectionclass.php#reflectionclass.constants.is-implicit-abstract |
|
28 | - */ |
|
29 | - public const IS_IMPLICIT_ABSTRACT = 16; |
|
30 | - |
|
31 | - /** |
|
32 | - * Indicates class that is abstract because of its definition. |
|
33 | - * |
|
34 | - * @link https://www.php.net/manual/en/class.reflectionclass.php#reflectionclass.constants.is-explicit-abstract |
|
35 | - */ |
|
36 | - public const IS_EXPLICIT_ABSTRACT = 64; |
|
37 | - |
|
38 | - /** |
|
39 | - * Indicates final class. |
|
40 | - * |
|
41 | - * @link https://www.php.net/manual/en/class.reflectionclass.php#reflectionclass.constants.is-final |
|
42 | - */ |
|
43 | - public const IS_FINAL = 32; |
|
44 | - |
|
45 | - /** |
|
46 | - * Constructs a ReflectionClass |
|
47 | - * |
|
48 | - * @link https://php.net/manual/en/reflectionclass.construct.php |
|
49 | - * @param string|object $objectOrClass Either a string containing the name of |
|
50 | - * the class to reflect, or an object. |
|
51 | - * @throws ReflectionException if the class does not exist. |
|
52 | - */ |
|
53 | - public function __construct(#[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $objectOrClass) {} |
|
54 | - |
|
55 | - /** |
|
56 | - * Exports a reflected class |
|
57 | - * |
|
58 | - * @link https://php.net/manual/en/reflectionclass.export.php |
|
59 | - * @param mixed $argument The reflection to export. |
|
60 | - * @param bool $return Setting to {@see true} will return the export, as |
|
61 | - * opposed to emitting it. Setting to {@see false} (the default) will do the opposite. |
|
62 | - * @return string|null If the $return parameter is set to {@see true}, then the |
|
63 | - * export is returned as a string, otherwise {@see null} is returned. |
|
64 | - * @removed 8.0 |
|
65 | - */ |
|
66 | - #[Deprecated(since: '7.4')] |
|
67 | - public static function export($argument, $return = false) {} |
|
68 | - |
|
69 | - /** |
|
70 | - * Returns the string representation of the ReflectionClass object. |
|
71 | - * |
|
72 | - * @link https://php.net/manual/en/reflectionclass.tostring.php |
|
73 | - * @return string A string representation of this {@see ReflectionClass} instance. |
|
74 | - */ |
|
75 | - #[TentativeType] |
|
76 | - public function __toString(): string {} |
|
77 | - |
|
78 | - /** |
|
79 | - * Gets class name |
|
80 | - * |
|
81 | - * @link https://php.net/manual/en/reflectionclass.getname.php |
|
82 | - * @return string The class name. |
|
83 | - */ |
|
84 | - #[Pure] |
|
85 | - #[TentativeType] |
|
86 | - public function getName(): string {} |
|
87 | - |
|
88 | - /** |
|
89 | - * Checks if class is defined internally by an extension, or the core |
|
90 | - * |
|
91 | - * @link https://php.net/manual/en/reflectionclass.isinternal.php |
|
92 | - * @return bool Returns {@see true} on success or {@see false} on failure. |
|
93 | - */ |
|
94 | - #[Pure] |
|
95 | - #[TentativeType] |
|
96 | - public function isInternal(): bool {} |
|
97 | - |
|
98 | - /** |
|
99 | - * Checks if user defined |
|
100 | - * |
|
101 | - * @link https://php.net/manual/en/reflectionclass.isuserdefined.php |
|
102 | - * @return bool Returns {@see true} on success or {@see false} on failure. |
|
103 | - */ |
|
104 | - #[Pure] |
|
105 | - #[TentativeType] |
|
106 | - public function isUserDefined(): bool {} |
|
107 | - |
|
108 | - /** |
|
109 | - * Checks if the class is instantiable |
|
110 | - * |
|
111 | - * @link https://php.net/manual/en/reflectionclass.isinstantiable.php |
|
112 | - * @return bool Returns {@see true} on success or {@see false} on failure. |
|
113 | - */ |
|
114 | - #[Pure] |
|
115 | - #[TentativeType] |
|
116 | - public function isInstantiable(): bool {} |
|
117 | - |
|
118 | - /** |
|
119 | - * Returns whether this class is cloneable |
|
120 | - * |
|
121 | - * @link https://php.net/manual/en/reflectionclass.iscloneable.php |
|
122 | - * @return bool Returns {@see true} if the class is cloneable, {@see false} otherwise. |
|
123 | - * @since 5.4 |
|
124 | - */ |
|
125 | - #[Pure] |
|
126 | - #[TentativeType] |
|
127 | - public function isCloneable(): bool {} |
|
128 | - |
|
129 | - /** |
|
130 | - * Gets the filename of the file in which the class has been defined |
|
131 | - * |
|
132 | - * @link https://php.net/manual/en/reflectionclass.getfilename.php |
|
133 | - * @return string|false the filename of the file in which the class has been defined. |
|
134 | - * If the class is defined in the PHP core or in a PHP extension, {@see false} |
|
135 | - * is returned. |
|
136 | - */ |
|
137 | - #[Pure] |
|
138 | - #[TentativeType] |
|
139 | - public function getFileName(): string|false {} |
|
140 | - |
|
141 | - /** |
|
142 | - * Gets starting line number |
|
143 | - * |
|
144 | - * @link https://php.net/manual/en/reflectionclass.getstartline.php |
|
145 | - * @return int The starting line number, as an integer. |
|
146 | - */ |
|
147 | - #[Pure] |
|
148 | - #[TentativeType] |
|
149 | - public function getStartLine(): int|false {} |
|
150 | - |
|
151 | - /** |
|
152 | - * Gets end line |
|
153 | - * |
|
154 | - * @link https://php.net/manual/en/reflectionclass.getendline.php |
|
155 | - * @return int|false The ending line number of the user defined class, or |
|
156 | - * {@see false} if unknown. |
|
157 | - */ |
|
158 | - #[Pure] |
|
159 | - #[TentativeType] |
|
160 | - public function getEndLine(): int|false {} |
|
161 | - |
|
162 | - /** |
|
163 | - * Gets doc comments |
|
164 | - * |
|
165 | - * @link https://php.net/manual/en/reflectionclass.getdoccomment.php |
|
166 | - * @return string|false The doc comment if it exists, otherwise {@see false} |
|
167 | - */ |
|
168 | - #[Pure] |
|
169 | - #[TentativeType] |
|
170 | - public function getDocComment(): string|false {} |
|
171 | - |
|
172 | - /** |
|
173 | - * Gets the constructor of the class |
|
174 | - * |
|
175 | - * @link https://php.net/manual/en/reflectionclass.getconstructor.php |
|
176 | - * @return ReflectionMethod|null A {@see ReflectionMethod} object reflecting |
|
177 | - * the class' constructor, or {@see null} if the class has no constructor. |
|
178 | - */ |
|
179 | - #[Pure] |
|
180 | - #[TentativeType] |
|
181 | - public function getConstructor(): ?ReflectionMethod {} |
|
182 | - |
|
183 | - /** |
|
184 | - * Checks if method is defined |
|
185 | - * |
|
186 | - * @link https://php.net/manual/en/reflectionclass.hasmethod.php |
|
187 | - * @param string $name Name of the method being checked for. |
|
188 | - * @return bool Returns {@see true} if it has the method, otherwise {@see false} |
|
189 | - */ |
|
190 | - #[TentativeType] |
|
191 | - public function hasMethod(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {} |
|
192 | - |
|
193 | - /** |
|
194 | - * Gets a <b>ReflectionMethod</b> for a class method. |
|
195 | - * |
|
196 | - * @link https://php.net/manual/en/reflectionclass.getmethod.php |
|
197 | - * @param string $name The method name to reflect. |
|
198 | - * @return ReflectionMethod A {@see ReflectionMethod} |
|
199 | - * @throws ReflectionException if the method does not exist. |
|
200 | - */ |
|
201 | - #[Pure] |
|
202 | - #[TentativeType] |
|
203 | - public function getMethod(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): ReflectionMethod {} |
|
204 | - |
|
205 | - /** |
|
206 | - * Gets an array of methods for the class. |
|
207 | - * |
|
208 | - * @link https://php.net/manual/en/reflectionclass.getmethods.php |
|
209 | - * @param int|null $filter Filter the results to include only methods |
|
210 | - * with certain attributes. Defaults to no filtering. |
|
211 | - * @return ReflectionMethod[] An array of {@see ReflectionMethod} objects |
|
212 | - * reflecting each method. |
|
213 | - */ |
|
214 | - #[Pure] |
|
215 | - #[TentativeType] |
|
216 | - public function getMethods(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $filter = null): array {} |
|
217 | - |
|
218 | - /** |
|
219 | - * Checks if property is defined |
|
220 | - * |
|
221 | - * @link https://php.net/manual/en/reflectionclass.hasproperty.php |
|
222 | - * @param string $name Name of the property being checked for. |
|
223 | - * @return bool Returns {@see true} if it has the property, otherwise {@see false} |
|
224 | - */ |
|
225 | - #[TentativeType] |
|
226 | - public function hasProperty(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {} |
|
227 | - |
|
228 | - /** |
|
229 | - * Gets a <b>ReflectionProperty</b> for a class's property |
|
230 | - * |
|
231 | - * @link https://php.net/manual/en/reflectionclass.getproperty.php |
|
232 | - * @param string $name The property name. |
|
233 | - * @return ReflectionProperty A {@see ReflectionProperty} |
|
234 | - * @throws ReflectionException If no property exists by that name. |
|
235 | - */ |
|
236 | - #[Pure] |
|
237 | - #[TentativeType] |
|
238 | - public function getProperty(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): ReflectionProperty {} |
|
239 | - |
|
240 | - /** |
|
241 | - * Gets properties |
|
242 | - * |
|
243 | - * @link https://php.net/manual/en/reflectionclass.getproperties.php |
|
244 | - * @param int|null $filter The optional filter, for filtering desired |
|
245 | - * property types. It's configured using the {@see ReflectionProperty} constants, |
|
246 | - * and defaults to all property types. |
|
247 | - * @return ReflectionProperty[] |
|
248 | - */ |
|
249 | - #[Pure] |
|
250 | - #[TentativeType] |
|
251 | - public function getProperties(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $filter = null): array {} |
|
252 | - |
|
253 | - /** |
|
254 | - * Gets a ReflectionClassConstant for a class's property |
|
255 | - * |
|
256 | - * @link https://php.net/manual/en/reflectionclass.getreflectionconstant.php |
|
257 | - * @param string $name The class constant name. |
|
258 | - * @return ReflectionClassConstant|false A {@see ReflectionClassConstant}. |
|
259 | - * @since 7.1 |
|
260 | - */ |
|
261 | - #[Pure] |
|
262 | - #[TentativeType] |
|
263 | - public function getReflectionConstant(string $name): ReflectionClassConstant|false {} |
|
264 | - |
|
265 | - /** |
|
266 | - * Gets class constants |
|
267 | - * |
|
268 | - * @link https://php.net/manual/en/reflectionclass.getreflectionconstants.php |
|
269 | - * @param int|null $filter [optional] allows the filtering of constants defined in a class by their visibility. Since 8.0. |
|
270 | - * @return ReflectionClassConstant[] An array of ReflectionClassConstant objects. |
|
271 | - * @since 7.1 |
|
272 | - */ |
|
273 | - #[Pure] |
|
274 | - #[TentativeType] |
|
275 | - public function getReflectionConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC|ReflectionClassConstant::IS_PROTECTED|ReflectionClassConstant::IS_PRIVATE): array {} |
|
276 | - |
|
277 | - /** |
|
278 | - * Checks if constant is defined |
|
279 | - * |
|
280 | - * @link https://php.net/manual/en/reflectionclass.hasconstant.php |
|
281 | - * @param string $name The name of the constant being checked for. |
|
282 | - * @return bool Returns {@see true} if the constant is defined, otherwise {@see false} |
|
283 | - */ |
|
284 | - #[TentativeType] |
|
285 | - public function hasConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {} |
|
286 | - |
|
287 | - /** |
|
288 | - * Gets constants |
|
289 | - * |
|
290 | - * @link https://php.net/manual/en/reflectionclass.getconstants.php |
|
291 | - * @param int|null $filter [optional] allows the filtering of constants defined in a class by their visibility. Since 8.0. |
|
292 | - * @return array An array of constants, where the keys hold the name and |
|
293 | - * the values the value of the constants. |
|
294 | - */ |
|
295 | - #[Pure] |
|
296 | - #[TentativeType] |
|
297 | - public function getConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC|ReflectionClassConstant::IS_PROTECTED|ReflectionClassConstant::IS_PRIVATE): array {} |
|
298 | - |
|
299 | - /** |
|
300 | - * Gets defined constant |
|
301 | - * |
|
302 | - * @link https://php.net/manual/en/reflectionclass.getconstant.php |
|
303 | - * @param string $name Name of the constant. |
|
304 | - * @return mixed|false Value of the constant with the name name. |
|
305 | - * Returns {@see false} if the constant was not found in the class. |
|
306 | - */ |
|
307 | - #[Pure] |
|
308 | - #[TentativeType] |
|
309 | - public function getConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): mixed {} |
|
310 | - |
|
311 | - /** |
|
312 | - * Gets the interfaces |
|
313 | - * |
|
314 | - * @link https://php.net/manual/en/reflectionclass.getinterfaces.php |
|
315 | - * @return ReflectionClass[] An associative array of interfaces, with keys as interface |
|
316 | - * names and the array values as {@see ReflectionClass} objects. |
|
317 | - */ |
|
318 | - #[Pure] |
|
319 | - #[TentativeType] |
|
320 | - public function getInterfaces(): array {} |
|
321 | - |
|
322 | - /** |
|
323 | - * Gets the interface names |
|
324 | - * |
|
325 | - * @link https://php.net/manual/en/reflectionclass.getinterfacenames.php |
|
326 | - * @return string[] A numerical array with interface names as the values. |
|
327 | - */ |
|
328 | - #[Pure] |
|
329 | - #[TentativeType] |
|
330 | - public function getInterfaceNames(): array {} |
|
331 | - |
|
332 | - /** |
|
333 | - * Checks if the class is anonymous |
|
334 | - * |
|
335 | - * @link https://php.net/manual/en/reflectionclass.isanonymous.php |
|
336 | - * @return bool Returns {@see true} on success or {@see false} on failure. |
|
337 | - * @since 7.0 |
|
338 | - */ |
|
339 | - #[Pure] |
|
340 | - #[TentativeType] |
|
341 | - public function isAnonymous(): bool {} |
|
342 | - |
|
343 | - /** |
|
344 | - * Checks if the class is an interface |
|
345 | - * |
|
346 | - * @link https://php.net/manual/en/reflectionclass.isinterface.php |
|
347 | - * @return bool Returns {@see true} on success or {@see false} on failure. |
|
348 | - */ |
|
349 | - #[Pure] |
|
350 | - #[TentativeType] |
|
351 | - public function isInterface(): bool {} |
|
352 | - |
|
353 | - /** |
|
354 | - * Returns an array of traits used by this class |
|
355 | - * |
|
356 | - * @link https://php.net/manual/en/reflectionclass.gettraits.php |
|
357 | - * @return ReflectionClass[] an array with trait names in keys and |
|
358 | - * instances of trait's {@see ReflectionClass} in values. |
|
359 | - * @since 5.4 |
|
360 | - */ |
|
361 | - #[Pure] |
|
362 | - #[TentativeType] |
|
363 | - public function getTraits(): array {} |
|
364 | - |
|
365 | - /** |
|
366 | - * Returns an array of names of traits used by this class |
|
367 | - * |
|
368 | - * @link https://php.net/manual/en/reflectionclass.gettraitnames.php |
|
369 | - * @return string[] An array with trait names in values. |
|
370 | - * Returns {@see null} in case of an error. |
|
371 | - * @since 5.4 |
|
372 | - */ |
|
373 | - #[Pure] |
|
374 | - #[TentativeType] |
|
375 | - public function getTraitNames(): array {} |
|
376 | - |
|
377 | - /** |
|
378 | - * Returns an array of trait aliases |
|
379 | - * |
|
380 | - * @link https://php.net/manual/en/reflectionclass.gettraitaliases.php |
|
381 | - * @return string[] an array with new method names in keys and original |
|
382 | - * names (in the format "TraitName::original") in values. |
|
383 | - * Returns {@see null} in case of an error. |
|
384 | - * @since 5.4 |
|
385 | - */ |
|
386 | - #[Pure] |
|
387 | - #[TentativeType] |
|
388 | - public function getTraitAliases(): array {} |
|
389 | - |
|
390 | - /** |
|
391 | - * Returns whether this is a trait |
|
392 | - * |
|
393 | - * @link https://php.net/manual/en/reflectionclass.istrait.php |
|
394 | - * @return bool Returns {@see true} if this is a trait, {@see false} otherwise. |
|
395 | - * Returns {@see null} in case of an error. |
|
396 | - * @since 5.4 |
|
397 | - */ |
|
398 | - #[Pure] |
|
399 | - #[TentativeType] |
|
400 | - public function isTrait(): bool {} |
|
401 | - |
|
402 | - /** |
|
403 | - * Checks if class is abstract |
|
404 | - * |
|
405 | - * @link https://php.net/manual/en/reflectionclass.isabstract.php |
|
406 | - * @return bool Returns {@see true} on success or {@see false} on failure. |
|
407 | - */ |
|
408 | - #[Pure] |
|
409 | - #[TentativeType] |
|
410 | - public function isAbstract(): bool {} |
|
411 | - |
|
412 | - /** |
|
413 | - * Checks if class is final |
|
414 | - * |
|
415 | - * @link https://php.net/manual/en/reflectionclass.isfinal.php |
|
416 | - * @return bool Returns {@see true} on success or {@see false} on failure. |
|
417 | - */ |
|
418 | - #[Pure] |
|
419 | - #[TentativeType] |
|
420 | - public function isFinal(): bool {} |
|
421 | - |
|
422 | - /** |
|
423 | - * Gets modifiers |
|
424 | - * |
|
425 | - * @link https://php.net/manual/en/reflectionclass.getmodifiers.php |
|
426 | - * @return int bitmask of modifier constants. |
|
427 | - */ |
|
428 | - #[Pure] |
|
429 | - #[TentativeType] |
|
430 | - public function getModifiers(): int {} |
|
431 | - |
|
432 | - /** |
|
433 | - * Checks class for instance |
|
434 | - * |
|
435 | - * @link https://php.net/manual/en/reflectionclass.isinstance.php |
|
436 | - * @param object $object The object being compared to. |
|
437 | - * @return bool Returns {@see true} on success or {@see false} on failure. |
|
438 | - */ |
|
439 | - #[Pure] |
|
440 | - #[TentativeType] |
|
441 | - public function isInstance(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): bool {} |
|
442 | - |
|
443 | - /** |
|
444 | - * Creates a new class instance from given arguments. |
|
445 | - * |
|
446 | - * @link https://php.net/manual/en/reflectionclass.newinstance.php |
|
447 | - * @param mixed ...$args Accepts a variable number of arguments which are |
|
448 | - * passed to the class constructor, much like {@see call_user_func} |
|
449 | - * @return object a new instance of the class. |
|
450 | - * @throws ReflectionException if the class constructor is not public or if |
|
451 | - * the class does not have a constructor and the $args parameter contains |
|
452 | - * one or more parameters. |
|
453 | - */ |
|
454 | - public function newInstance(...$args) {} |
|
455 | - |
|
456 | - /** |
|
457 | - * Creates a new class instance without invoking the constructor. |
|
458 | - * |
|
459 | - * @link https://php.net/manual/en/reflectionclass.newinstancewithoutconstructor.php |
|
460 | - * @return object a new instance of the class. |
|
461 | - * @throws ReflectionException if the class is an internal class that |
|
462 | - * cannot be instantiated without invoking the constructor. In PHP 5.6.0 |
|
463 | - * onwards, this exception is limited only to internal classes that are final. |
|
464 | - * @since 5.4 |
|
465 | - */ |
|
466 | - #[TentativeType] |
|
467 | - public function newInstanceWithoutConstructor(): object {} |
|
468 | - |
|
469 | - /** |
|
470 | - * Creates a new class instance from given arguments. |
|
471 | - * |
|
472 | - * @link https://php.net/manual/en/reflectionclass.newinstanceargs.php |
|
473 | - * @param array $args The parameters to be passed to the class constructor as an array. |
|
474 | - * @return object|null a new instance of the class. |
|
475 | - * @throws ReflectionException if the class constructor is not public or if |
|
476 | - * the class does not have a constructor and the $args parameter contains |
|
477 | - * one or more parameters. |
|
478 | - * @since 5.1.3 |
|
479 | - */ |
|
480 | - #[TentativeType] |
|
481 | - public function newInstanceArgs(array $args = []): ?object {} |
|
482 | - |
|
483 | - /** |
|
484 | - * Gets parent class |
|
485 | - * |
|
486 | - * @link https://php.net/manual/en/reflectionclass.getparentclass.php |
|
487 | - * @return ReflectionClass|false A {@see ReflectionClass} or {@see false} |
|
488 | - * if there's no parent. |
|
489 | - */ |
|
490 | - #[Pure] |
|
491 | - #[TentativeType] |
|
492 | - public function getParentClass(): ReflectionClass|false {} |
|
493 | - |
|
494 | - /** |
|
495 | - * Checks if a subclass |
|
496 | - * |
|
497 | - * @link https://php.net/manual/en/reflectionclass.issubclassof.php |
|
498 | - * @param string|ReflectionClass $class Either the name of the class as |
|
499 | - * string or a {@see ReflectionClass} object of the class to check against. |
|
500 | - * @return bool {@see true} on success or {@see false} on failure. |
|
501 | - */ |
|
502 | - #[Pure] |
|
503 | - #[TentativeType] |
|
504 | - public function isSubclassOf(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass|string'], default: '')] $class): bool {} |
|
505 | - |
|
506 | - /** |
|
507 | - * Gets static properties |
|
508 | - * |
|
509 | - * @link https://php.net/manual/en/reflectionclass.getstaticproperties.php |
|
510 | - * @return array|null The static properties, as an array where the keys hold |
|
511 | - * the name and the values the value of the properties. |
|
512 | - */ |
|
513 | - #[Pure] |
|
514 | - #[TentativeType] |
|
515 | - public function getStaticProperties(): ?array {} |
|
516 | - |
|
517 | - /** |
|
518 | - * Gets static property value |
|
519 | - * |
|
520 | - * @link https://php.net/manual/en/reflectionclass.getstaticpropertyvalue.php |
|
521 | - * @param string $name The name of the static property for which to return a value. |
|
522 | - * @param mixed $default A default value to return in case the class does |
|
523 | - * not declare a static property with the given name. If the property does |
|
524 | - * not exist and this argument is omitted, a {@see ReflectionException} is thrown. |
|
525 | - * @return mixed The value of the static property. |
|
526 | - */ |
|
527 | - #[Pure] |
|
528 | - #[TentativeType] |
|
529 | - public function getStaticPropertyValue( |
|
530 | - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name, |
|
531 | - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $default = null |
|
532 | - ): mixed {} |
|
533 | - |
|
534 | - /** |
|
535 | - * Sets static property value |
|
536 | - * |
|
537 | - * @link https://php.net/manual/en/reflectionclass.setstaticpropertyvalue.php |
|
538 | - * @param string $name Property name. |
|
539 | - * @param mixed $value New property value. |
|
540 | - * @return void No value is returned. |
|
541 | - */ |
|
542 | - #[TentativeType] |
|
543 | - public function setStaticPropertyValue( |
|
544 | - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name, |
|
545 | - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value |
|
546 | - ): void {} |
|
547 | - |
|
548 | - /** |
|
549 | - * Gets default properties |
|
550 | - * |
|
551 | - * @link https://php.net/manual/en/reflectionclass.getdefaultproperties.php |
|
552 | - * @return mixed[] An array of default properties, with the key being the name |
|
553 | - * of the property and the value being the default value of the property |
|
554 | - * or {@see null} if the property doesn't have a default value. The function |
|
555 | - * does not distinguish between static and non static properties and does |
|
556 | - * not take visibility modifiers into account. |
|
557 | - */ |
|
558 | - #[Pure] |
|
559 | - #[TentativeType] |
|
560 | - public function getDefaultProperties(): array {} |
|
561 | - |
|
562 | - /** |
|
563 | - * An alias of {@see ReflectionClass::isIterable} method. |
|
564 | - * |
|
565 | - * @link https://php.net/manual/en/reflectionclass.isiterateable.php |
|
566 | - * @return bool Returns {@see true} on success or {@see false} on failure. |
|
567 | - */ |
|
568 | - #[Pure] |
|
569 | - #[TentativeType] |
|
570 | - public function isIterateable(): bool {} |
|
571 | - |
|
572 | - /** |
|
573 | - * Check whether this class is iterable |
|
574 | - * |
|
575 | - * @link https://php.net/manual/en/reflectionclass.isiterable.php |
|
576 | - * @return bool Returns {@see true} on success or {@see false} on failure. |
|
577 | - * @since 7.2 |
|
578 | - */ |
|
579 | - #[Pure] |
|
580 | - #[TentativeType] |
|
581 | - public function isIterable(): bool {} |
|
582 | - |
|
583 | - /** |
|
584 | - * Checks whether it implements an interface. |
|
585 | - * |
|
586 | - * @link https://php.net/manual/en/reflectionclass.implementsinterface.php |
|
587 | - * @param string $interface The interface name. |
|
588 | - * @return bool Returns {@see true} on success or {@see false} on failure. |
|
589 | - */ |
|
590 | - #[TentativeType] |
|
591 | - public function implementsInterface(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass|string'], default: '')] $interface): bool {} |
|
592 | - |
|
593 | - /** |
|
594 | - * Gets a <b>ReflectionExtension</b> object for the extension which defined the class |
|
595 | - * |
|
596 | - * @link https://php.net/manual/en/reflectionclass.getextension.php |
|
597 | - * @return ReflectionExtension|null A {@see ReflectionExtension} object representing |
|
598 | - * the extension which defined the class, or {@see null} for user-defined classes. |
|
599 | - */ |
|
600 | - #[Pure] |
|
601 | - #[TentativeType] |
|
602 | - public function getExtension(): ?ReflectionExtension {} |
|
603 | - |
|
604 | - /** |
|
605 | - * Gets the name of the extension which defined the class |
|
606 | - * |
|
607 | - * @link https://php.net/manual/en/reflectionclass.getextensionname.php |
|
608 | - * @return string|false The name of the extension which defined the class, |
|
609 | - * or {@see false} for user-defined classes. |
|
610 | - */ |
|
611 | - #[Pure] |
|
612 | - #[TentativeType] |
|
613 | - public function getExtensionName(): string|false {} |
|
614 | - |
|
615 | - /** |
|
616 | - * Checks if in namespace |
|
617 | - * |
|
618 | - * @link https://php.net/manual/en/reflectionclass.innamespace.php |
|
619 | - * @return bool {@see true} on success or {@see false} on failure. |
|
620 | - */ |
|
621 | - #[TentativeType] |
|
622 | - public function inNamespace(): bool {} |
|
623 | - |
|
624 | - /** |
|
625 | - * Gets namespace name |
|
626 | - * |
|
627 | - * @link https://php.net/manual/en/reflectionclass.getnamespacename.php |
|
628 | - * @return string The namespace name. |
|
629 | - */ |
|
630 | - #[Pure] |
|
631 | - #[TentativeType] |
|
632 | - public function getNamespaceName(): string {} |
|
633 | - |
|
634 | - /** |
|
635 | - * Gets short name |
|
636 | - * |
|
637 | - * @link https://php.net/manual/en/reflectionclass.getshortname.php |
|
638 | - * @return string The class short name. |
|
639 | - */ |
|
640 | - #[Pure] |
|
641 | - #[TentativeType] |
|
642 | - public function getShortName(): string {} |
|
643 | - |
|
644 | - /** |
|
645 | - * Returns an array of function attributes. |
|
646 | - * |
|
647 | - * @param string|null $name Name of an attribute class |
|
648 | - * @param int $flags Сriteria by which the attribute is searched. |
|
649 | - * @return ReflectionAttribute[] |
|
650 | - * @since 8.0 |
|
651 | - */ |
|
652 | - #[Pure] |
|
653 | - public function getAttributes(?string $name = null, int $flags = 0): array {} |
|
654 | - |
|
655 | - /** |
|
656 | - * Clones object |
|
657 | - * |
|
658 | - * @link https://php.net/manual/en/reflectionclass.clone.php |
|
659 | - * @return void |
|
660 | - */ |
|
661 | - final private function __clone(): void {} |
|
662 | - |
|
663 | - #[PhpStormStubsElementAvailable('8.1')] |
|
664 | - public function isEnum(): bool {} |
|
17 | + /** |
|
18 | + * @var string Name of the class, same as calling the {@see ReflectionClass::getName()} method |
|
19 | + */ |
|
20 | + #[Immutable] |
|
21 | + #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] |
|
22 | + public $name; |
|
23 | + |
|
24 | + /** |
|
25 | + * Indicates class that is abstract because it has some abstract methods. |
|
26 | + * |
|
27 | + * @link https://www.php.net/manual/en/class.reflectionclass.php#reflectionclass.constants.is-implicit-abstract |
|
28 | + */ |
|
29 | + public const IS_IMPLICIT_ABSTRACT = 16; |
|
30 | + |
|
31 | + /** |
|
32 | + * Indicates class that is abstract because of its definition. |
|
33 | + * |
|
34 | + * @link https://www.php.net/manual/en/class.reflectionclass.php#reflectionclass.constants.is-explicit-abstract |
|
35 | + */ |
|
36 | + public const IS_EXPLICIT_ABSTRACT = 64; |
|
37 | + |
|
38 | + /** |
|
39 | + * Indicates final class. |
|
40 | + * |
|
41 | + * @link https://www.php.net/manual/en/class.reflectionclass.php#reflectionclass.constants.is-final |
|
42 | + */ |
|
43 | + public const IS_FINAL = 32; |
|
44 | + |
|
45 | + /** |
|
46 | + * Constructs a ReflectionClass |
|
47 | + * |
|
48 | + * @link https://php.net/manual/en/reflectionclass.construct.php |
|
49 | + * @param string|object $objectOrClass Either a string containing the name of |
|
50 | + * the class to reflect, or an object. |
|
51 | + * @throws ReflectionException if the class does not exist. |
|
52 | + */ |
|
53 | + public function __construct(#[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $objectOrClass) {} |
|
54 | + |
|
55 | + /** |
|
56 | + * Exports a reflected class |
|
57 | + * |
|
58 | + * @link https://php.net/manual/en/reflectionclass.export.php |
|
59 | + * @param mixed $argument The reflection to export. |
|
60 | + * @param bool $return Setting to {@see true} will return the export, as |
|
61 | + * opposed to emitting it. Setting to {@see false} (the default) will do the opposite. |
|
62 | + * @return string|null If the $return parameter is set to {@see true}, then the |
|
63 | + * export is returned as a string, otherwise {@see null} is returned. |
|
64 | + * @removed 8.0 |
|
65 | + */ |
|
66 | + #[Deprecated(since: '7.4')] |
|
67 | + public static function export($argument, $return = false) {} |
|
68 | + |
|
69 | + /** |
|
70 | + * Returns the string representation of the ReflectionClass object. |
|
71 | + * |
|
72 | + * @link https://php.net/manual/en/reflectionclass.tostring.php |
|
73 | + * @return string A string representation of this {@see ReflectionClass} instance. |
|
74 | + */ |
|
75 | + #[TentativeType] |
|
76 | + public function __toString(): string {} |
|
77 | + |
|
78 | + /** |
|
79 | + * Gets class name |
|
80 | + * |
|
81 | + * @link https://php.net/manual/en/reflectionclass.getname.php |
|
82 | + * @return string The class name. |
|
83 | + */ |
|
84 | + #[Pure] |
|
85 | + #[TentativeType] |
|
86 | + public function getName(): string {} |
|
87 | + |
|
88 | + /** |
|
89 | + * Checks if class is defined internally by an extension, or the core |
|
90 | + * |
|
91 | + * @link https://php.net/manual/en/reflectionclass.isinternal.php |
|
92 | + * @return bool Returns {@see true} on success or {@see false} on failure. |
|
93 | + */ |
|
94 | + #[Pure] |
|
95 | + #[TentativeType] |
|
96 | + public function isInternal(): bool {} |
|
97 | + |
|
98 | + /** |
|
99 | + * Checks if user defined |
|
100 | + * |
|
101 | + * @link https://php.net/manual/en/reflectionclass.isuserdefined.php |
|
102 | + * @return bool Returns {@see true} on success or {@see false} on failure. |
|
103 | + */ |
|
104 | + #[Pure] |
|
105 | + #[TentativeType] |
|
106 | + public function isUserDefined(): bool {} |
|
107 | + |
|
108 | + /** |
|
109 | + * Checks if the class is instantiable |
|
110 | + * |
|
111 | + * @link https://php.net/manual/en/reflectionclass.isinstantiable.php |
|
112 | + * @return bool Returns {@see true} on success or {@see false} on failure. |
|
113 | + */ |
|
114 | + #[Pure] |
|
115 | + #[TentativeType] |
|
116 | + public function isInstantiable(): bool {} |
|
117 | + |
|
118 | + /** |
|
119 | + * Returns whether this class is cloneable |
|
120 | + * |
|
121 | + * @link https://php.net/manual/en/reflectionclass.iscloneable.php |
|
122 | + * @return bool Returns {@see true} if the class is cloneable, {@see false} otherwise. |
|
123 | + * @since 5.4 |
|
124 | + */ |
|
125 | + #[Pure] |
|
126 | + #[TentativeType] |
|
127 | + public function isCloneable(): bool {} |
|
128 | + |
|
129 | + /** |
|
130 | + * Gets the filename of the file in which the class has been defined |
|
131 | + * |
|
132 | + * @link https://php.net/manual/en/reflectionclass.getfilename.php |
|
133 | + * @return string|false the filename of the file in which the class has been defined. |
|
134 | + * If the class is defined in the PHP core or in a PHP extension, {@see false} |
|
135 | + * is returned. |
|
136 | + */ |
|
137 | + #[Pure] |
|
138 | + #[TentativeType] |
|
139 | + public function getFileName(): string|false {} |
|
140 | + |
|
141 | + /** |
|
142 | + * Gets starting line number |
|
143 | + * |
|
144 | + * @link https://php.net/manual/en/reflectionclass.getstartline.php |
|
145 | + * @return int The starting line number, as an integer. |
|
146 | + */ |
|
147 | + #[Pure] |
|
148 | + #[TentativeType] |
|
149 | + public function getStartLine(): int|false {} |
|
150 | + |
|
151 | + /** |
|
152 | + * Gets end line |
|
153 | + * |
|
154 | + * @link https://php.net/manual/en/reflectionclass.getendline.php |
|
155 | + * @return int|false The ending line number of the user defined class, or |
|
156 | + * {@see false} if unknown. |
|
157 | + */ |
|
158 | + #[Pure] |
|
159 | + #[TentativeType] |
|
160 | + public function getEndLine(): int|false {} |
|
161 | + |
|
162 | + /** |
|
163 | + * Gets doc comments |
|
164 | + * |
|
165 | + * @link https://php.net/manual/en/reflectionclass.getdoccomment.php |
|
166 | + * @return string|false The doc comment if it exists, otherwise {@see false} |
|
167 | + */ |
|
168 | + #[Pure] |
|
169 | + #[TentativeType] |
|
170 | + public function getDocComment(): string|false {} |
|
171 | + |
|
172 | + /** |
|
173 | + * Gets the constructor of the class |
|
174 | + * |
|
175 | + * @link https://php.net/manual/en/reflectionclass.getconstructor.php |
|
176 | + * @return ReflectionMethod|null A {@see ReflectionMethod} object reflecting |
|
177 | + * the class' constructor, or {@see null} if the class has no constructor. |
|
178 | + */ |
|
179 | + #[Pure] |
|
180 | + #[TentativeType] |
|
181 | + public function getConstructor(): ?ReflectionMethod {} |
|
182 | + |
|
183 | + /** |
|
184 | + * Checks if method is defined |
|
185 | + * |
|
186 | + * @link https://php.net/manual/en/reflectionclass.hasmethod.php |
|
187 | + * @param string $name Name of the method being checked for. |
|
188 | + * @return bool Returns {@see true} if it has the method, otherwise {@see false} |
|
189 | + */ |
|
190 | + #[TentativeType] |
|
191 | + public function hasMethod(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {} |
|
192 | + |
|
193 | + /** |
|
194 | + * Gets a <b>ReflectionMethod</b> for a class method. |
|
195 | + * |
|
196 | + * @link https://php.net/manual/en/reflectionclass.getmethod.php |
|
197 | + * @param string $name The method name to reflect. |
|
198 | + * @return ReflectionMethod A {@see ReflectionMethod} |
|
199 | + * @throws ReflectionException if the method does not exist. |
|
200 | + */ |
|
201 | + #[Pure] |
|
202 | + #[TentativeType] |
|
203 | + public function getMethod(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): ReflectionMethod {} |
|
204 | + |
|
205 | + /** |
|
206 | + * Gets an array of methods for the class. |
|
207 | + * |
|
208 | + * @link https://php.net/manual/en/reflectionclass.getmethods.php |
|
209 | + * @param int|null $filter Filter the results to include only methods |
|
210 | + * with certain attributes. Defaults to no filtering. |
|
211 | + * @return ReflectionMethod[] An array of {@see ReflectionMethod} objects |
|
212 | + * reflecting each method. |
|
213 | + */ |
|
214 | + #[Pure] |
|
215 | + #[TentativeType] |
|
216 | + public function getMethods(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $filter = null): array {} |
|
217 | + |
|
218 | + /** |
|
219 | + * Checks if property is defined |
|
220 | + * |
|
221 | + * @link https://php.net/manual/en/reflectionclass.hasproperty.php |
|
222 | + * @param string $name Name of the property being checked for. |
|
223 | + * @return bool Returns {@see true} if it has the property, otherwise {@see false} |
|
224 | + */ |
|
225 | + #[TentativeType] |
|
226 | + public function hasProperty(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {} |
|
227 | + |
|
228 | + /** |
|
229 | + * Gets a <b>ReflectionProperty</b> for a class's property |
|
230 | + * |
|
231 | + * @link https://php.net/manual/en/reflectionclass.getproperty.php |
|
232 | + * @param string $name The property name. |
|
233 | + * @return ReflectionProperty A {@see ReflectionProperty} |
|
234 | + * @throws ReflectionException If no property exists by that name. |
|
235 | + */ |
|
236 | + #[Pure] |
|
237 | + #[TentativeType] |
|
238 | + public function getProperty(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): ReflectionProperty {} |
|
239 | + |
|
240 | + /** |
|
241 | + * Gets properties |
|
242 | + * |
|
243 | + * @link https://php.net/manual/en/reflectionclass.getproperties.php |
|
244 | + * @param int|null $filter The optional filter, for filtering desired |
|
245 | + * property types. It's configured using the {@see ReflectionProperty} constants, |
|
246 | + * and defaults to all property types. |
|
247 | + * @return ReflectionProperty[] |
|
248 | + */ |
|
249 | + #[Pure] |
|
250 | + #[TentativeType] |
|
251 | + public function getProperties(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $filter = null): array {} |
|
252 | + |
|
253 | + /** |
|
254 | + * Gets a ReflectionClassConstant for a class's property |
|
255 | + * |
|
256 | + * @link https://php.net/manual/en/reflectionclass.getreflectionconstant.php |
|
257 | + * @param string $name The class constant name. |
|
258 | + * @return ReflectionClassConstant|false A {@see ReflectionClassConstant}. |
|
259 | + * @since 7.1 |
|
260 | + */ |
|
261 | + #[Pure] |
|
262 | + #[TentativeType] |
|
263 | + public function getReflectionConstant(string $name): ReflectionClassConstant|false {} |
|
264 | + |
|
265 | + /** |
|
266 | + * Gets class constants |
|
267 | + * |
|
268 | + * @link https://php.net/manual/en/reflectionclass.getreflectionconstants.php |
|
269 | + * @param int|null $filter [optional] allows the filtering of constants defined in a class by their visibility. Since 8.0. |
|
270 | + * @return ReflectionClassConstant[] An array of ReflectionClassConstant objects. |
|
271 | + * @since 7.1 |
|
272 | + */ |
|
273 | + #[Pure] |
|
274 | + #[TentativeType] |
|
275 | + public function getReflectionConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC|ReflectionClassConstant::IS_PROTECTED|ReflectionClassConstant::IS_PRIVATE): array {} |
|
276 | + |
|
277 | + /** |
|
278 | + * Checks if constant is defined |
|
279 | + * |
|
280 | + * @link https://php.net/manual/en/reflectionclass.hasconstant.php |
|
281 | + * @param string $name The name of the constant being checked for. |
|
282 | + * @return bool Returns {@see true} if the constant is defined, otherwise {@see false} |
|
283 | + */ |
|
284 | + #[TentativeType] |
|
285 | + public function hasConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {} |
|
286 | + |
|
287 | + /** |
|
288 | + * Gets constants |
|
289 | + * |
|
290 | + * @link https://php.net/manual/en/reflectionclass.getconstants.php |
|
291 | + * @param int|null $filter [optional] allows the filtering of constants defined in a class by their visibility. Since 8.0. |
|
292 | + * @return array An array of constants, where the keys hold the name and |
|
293 | + * the values the value of the constants. |
|
294 | + */ |
|
295 | + #[Pure] |
|
296 | + #[TentativeType] |
|
297 | + public function getConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC|ReflectionClassConstant::IS_PROTECTED|ReflectionClassConstant::IS_PRIVATE): array {} |
|
298 | + |
|
299 | + /** |
|
300 | + * Gets defined constant |
|
301 | + * |
|
302 | + * @link https://php.net/manual/en/reflectionclass.getconstant.php |
|
303 | + * @param string $name Name of the constant. |
|
304 | + * @return mixed|false Value of the constant with the name name. |
|
305 | + * Returns {@see false} if the constant was not found in the class. |
|
306 | + */ |
|
307 | + #[Pure] |
|
308 | + #[TentativeType] |
|
309 | + public function getConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): mixed {} |
|
310 | + |
|
311 | + /** |
|
312 | + * Gets the interfaces |
|
313 | + * |
|
314 | + * @link https://php.net/manual/en/reflectionclass.getinterfaces.php |
|
315 | + * @return ReflectionClass[] An associative array of interfaces, with keys as interface |
|
316 | + * names and the array values as {@see ReflectionClass} objects. |
|
317 | + */ |
|
318 | + #[Pure] |
|
319 | + #[TentativeType] |
|
320 | + public function getInterfaces(): array {} |
|
321 | + |
|
322 | + /** |
|
323 | + * Gets the interface names |
|
324 | + * |
|
325 | + * @link https://php.net/manual/en/reflectionclass.getinterfacenames.php |
|
326 | + * @return string[] A numerical array with interface names as the values. |
|
327 | + */ |
|
328 | + #[Pure] |
|
329 | + #[TentativeType] |
|
330 | + public function getInterfaceNames(): array {} |
|
331 | + |
|
332 | + /** |
|
333 | + * Checks if the class is anonymous |
|
334 | + * |
|
335 | + * @link https://php.net/manual/en/reflectionclass.isanonymous.php |
|
336 | + * @return bool Returns {@see true} on success or {@see false} on failure. |
|
337 | + * @since 7.0 |
|
338 | + */ |
|
339 | + #[Pure] |
|
340 | + #[TentativeType] |
|
341 | + public function isAnonymous(): bool {} |
|
342 | + |
|
343 | + /** |
|
344 | + * Checks if the class is an interface |
|
345 | + * |
|
346 | + * @link https://php.net/manual/en/reflectionclass.isinterface.php |
|
347 | + * @return bool Returns {@see true} on success or {@see false} on failure. |
|
348 | + */ |
|
349 | + #[Pure] |
|
350 | + #[TentativeType] |
|
351 | + public function isInterface(): bool {} |
|
352 | + |
|
353 | + /** |
|
354 | + * Returns an array of traits used by this class |
|
355 | + * |
|
356 | + * @link https://php.net/manual/en/reflectionclass.gettraits.php |
|
357 | + * @return ReflectionClass[] an array with trait names in keys and |
|
358 | + * instances of trait's {@see ReflectionClass} in values. |
|
359 | + * @since 5.4 |
|
360 | + */ |
|
361 | + #[Pure] |
|
362 | + #[TentativeType] |
|
363 | + public function getTraits(): array {} |
|
364 | + |
|
365 | + /** |
|
366 | + * Returns an array of names of traits used by this class |
|
367 | + * |
|
368 | + * @link https://php.net/manual/en/reflectionclass.gettraitnames.php |
|
369 | + * @return string[] An array with trait names in values. |
|
370 | + * Returns {@see null} in case of an error. |
|
371 | + * @since 5.4 |
|
372 | + */ |
|
373 | + #[Pure] |
|
374 | + #[TentativeType] |
|
375 | + public function getTraitNames(): array {} |
|
376 | + |
|
377 | + /** |
|
378 | + * Returns an array of trait aliases |
|
379 | + * |
|
380 | + * @link https://php.net/manual/en/reflectionclass.gettraitaliases.php |
|
381 | + * @return string[] an array with new method names in keys and original |
|
382 | + * names (in the format "TraitName::original") in values. |
|
383 | + * Returns {@see null} in case of an error. |
|
384 | + * @since 5.4 |
|
385 | + */ |
|
386 | + #[Pure] |
|
387 | + #[TentativeType] |
|
388 | + public function getTraitAliases(): array {} |
|
389 | + |
|
390 | + /** |
|
391 | + * Returns whether this is a trait |
|
392 | + * |
|
393 | + * @link https://php.net/manual/en/reflectionclass.istrait.php |
|
394 | + * @return bool Returns {@see true} if this is a trait, {@see false} otherwise. |
|
395 | + * Returns {@see null} in case of an error. |
|
396 | + * @since 5.4 |
|
397 | + */ |
|
398 | + #[Pure] |
|
399 | + #[TentativeType] |
|
400 | + public function isTrait(): bool {} |
|
401 | + |
|
402 | + /** |
|
403 | + * Checks if class is abstract |
|
404 | + * |
|
405 | + * @link https://php.net/manual/en/reflectionclass.isabstract.php |
|
406 | + * @return bool Returns {@see true} on success or {@see false} on failure. |
|
407 | + */ |
|
408 | + #[Pure] |
|
409 | + #[TentativeType] |
|
410 | + public function isAbstract(): bool {} |
|
411 | + |
|
412 | + /** |
|
413 | + * Checks if class is final |
|
414 | + * |
|
415 | + * @link https://php.net/manual/en/reflectionclass.isfinal.php |
|
416 | + * @return bool Returns {@see true} on success or {@see false} on failure. |
|
417 | + */ |
|
418 | + #[Pure] |
|
419 | + #[TentativeType] |
|
420 | + public function isFinal(): bool {} |
|
421 | + |
|
422 | + /** |
|
423 | + * Gets modifiers |
|
424 | + * |
|
425 | + * @link https://php.net/manual/en/reflectionclass.getmodifiers.php |
|
426 | + * @return int bitmask of modifier constants. |
|
427 | + */ |
|
428 | + #[Pure] |
|
429 | + #[TentativeType] |
|
430 | + public function getModifiers(): int {} |
|
431 | + |
|
432 | + /** |
|
433 | + * Checks class for instance |
|
434 | + * |
|
435 | + * @link https://php.net/manual/en/reflectionclass.isinstance.php |
|
436 | + * @param object $object The object being compared to. |
|
437 | + * @return bool Returns {@see true} on success or {@see false} on failure. |
|
438 | + */ |
|
439 | + #[Pure] |
|
440 | + #[TentativeType] |
|
441 | + public function isInstance(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): bool {} |
|
442 | + |
|
443 | + /** |
|
444 | + * Creates a new class instance from given arguments. |
|
445 | + * |
|
446 | + * @link https://php.net/manual/en/reflectionclass.newinstance.php |
|
447 | + * @param mixed ...$args Accepts a variable number of arguments which are |
|
448 | + * passed to the class constructor, much like {@see call_user_func} |
|
449 | + * @return object a new instance of the class. |
|
450 | + * @throws ReflectionException if the class constructor is not public or if |
|
451 | + * the class does not have a constructor and the $args parameter contains |
|
452 | + * one or more parameters. |
|
453 | + */ |
|
454 | + public function newInstance(...$args) {} |
|
455 | + |
|
456 | + /** |
|
457 | + * Creates a new class instance without invoking the constructor. |
|
458 | + * |
|
459 | + * @link https://php.net/manual/en/reflectionclass.newinstancewithoutconstructor.php |
|
460 | + * @return object a new instance of the class. |
|
461 | + * @throws ReflectionException if the class is an internal class that |
|
462 | + * cannot be instantiated without invoking the constructor. In PHP 5.6.0 |
|
463 | + * onwards, this exception is limited only to internal classes that are final. |
|
464 | + * @since 5.4 |
|
465 | + */ |
|
466 | + #[TentativeType] |
|
467 | + public function newInstanceWithoutConstructor(): object {} |
|
468 | + |
|
469 | + /** |
|
470 | + * Creates a new class instance from given arguments. |
|
471 | + * |
|
472 | + * @link https://php.net/manual/en/reflectionclass.newinstanceargs.php |
|
473 | + * @param array $args The parameters to be passed to the class constructor as an array. |
|
474 | + * @return object|null a new instance of the class. |
|
475 | + * @throws ReflectionException if the class constructor is not public or if |
|
476 | + * the class does not have a constructor and the $args parameter contains |
|
477 | + * one or more parameters. |
|
478 | + * @since 5.1.3 |
|
479 | + */ |
|
480 | + #[TentativeType] |
|
481 | + public function newInstanceArgs(array $args = []): ?object {} |
|
482 | + |
|
483 | + /** |
|
484 | + * Gets parent class |
|
485 | + * |
|
486 | + * @link https://php.net/manual/en/reflectionclass.getparentclass.php |
|
487 | + * @return ReflectionClass|false A {@see ReflectionClass} or {@see false} |
|
488 | + * if there's no parent. |
|
489 | + */ |
|
490 | + #[Pure] |
|
491 | + #[TentativeType] |
|
492 | + public function getParentClass(): ReflectionClass|false {} |
|
493 | + |
|
494 | + /** |
|
495 | + * Checks if a subclass |
|
496 | + * |
|
497 | + * @link https://php.net/manual/en/reflectionclass.issubclassof.php |
|
498 | + * @param string|ReflectionClass $class Either the name of the class as |
|
499 | + * string or a {@see ReflectionClass} object of the class to check against. |
|
500 | + * @return bool {@see true} on success or {@see false} on failure. |
|
501 | + */ |
|
502 | + #[Pure] |
|
503 | + #[TentativeType] |
|
504 | + public function isSubclassOf(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass|string'], default: '')] $class): bool {} |
|
505 | + |
|
506 | + /** |
|
507 | + * Gets static properties |
|
508 | + * |
|
509 | + * @link https://php.net/manual/en/reflectionclass.getstaticproperties.php |
|
510 | + * @return array|null The static properties, as an array where the keys hold |
|
511 | + * the name and the values the value of the properties. |
|
512 | + */ |
|
513 | + #[Pure] |
|
514 | + #[TentativeType] |
|
515 | + public function getStaticProperties(): ?array {} |
|
516 | + |
|
517 | + /** |
|
518 | + * Gets static property value |
|
519 | + * |
|
520 | + * @link https://php.net/manual/en/reflectionclass.getstaticpropertyvalue.php |
|
521 | + * @param string $name The name of the static property for which to return a value. |
|
522 | + * @param mixed $default A default value to return in case the class does |
|
523 | + * not declare a static property with the given name. If the property does |
|
524 | + * not exist and this argument is omitted, a {@see ReflectionException} is thrown. |
|
525 | + * @return mixed The value of the static property. |
|
526 | + */ |
|
527 | + #[Pure] |
|
528 | + #[TentativeType] |
|
529 | + public function getStaticPropertyValue( |
|
530 | + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name, |
|
531 | + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $default = null |
|
532 | + ): mixed {} |
|
533 | + |
|
534 | + /** |
|
535 | + * Sets static property value |
|
536 | + * |
|
537 | + * @link https://php.net/manual/en/reflectionclass.setstaticpropertyvalue.php |
|
538 | + * @param string $name Property name. |
|
539 | + * @param mixed $value New property value. |
|
540 | + * @return void No value is returned. |
|
541 | + */ |
|
542 | + #[TentativeType] |
|
543 | + public function setStaticPropertyValue( |
|
544 | + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name, |
|
545 | + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value |
|
546 | + ): void {} |
|
547 | + |
|
548 | + /** |
|
549 | + * Gets default properties |
|
550 | + * |
|
551 | + * @link https://php.net/manual/en/reflectionclass.getdefaultproperties.php |
|
552 | + * @return mixed[] An array of default properties, with the key being the name |
|
553 | + * of the property and the value being the default value of the property |
|
554 | + * or {@see null} if the property doesn't have a default value. The function |
|
555 | + * does not distinguish between static and non static properties and does |
|
556 | + * not take visibility modifiers into account. |
|
557 | + */ |
|
558 | + #[Pure] |
|
559 | + #[TentativeType] |
|
560 | + public function getDefaultProperties(): array {} |
|
561 | + |
|
562 | + /** |
|
563 | + * An alias of {@see ReflectionClass::isIterable} method. |
|
564 | + * |
|
565 | + * @link https://php.net/manual/en/reflectionclass.isiterateable.php |
|
566 | + * @return bool Returns {@see true} on success or {@see false} on failure. |
|
567 | + */ |
|
568 | + #[Pure] |
|
569 | + #[TentativeType] |
|
570 | + public function isIterateable(): bool {} |
|
571 | + |
|
572 | + /** |
|
573 | + * Check whether this class is iterable |
|
574 | + * |
|
575 | + * @link https://php.net/manual/en/reflectionclass.isiterable.php |
|
576 | + * @return bool Returns {@see true} on success or {@see false} on failure. |
|
577 | + * @since 7.2 |
|
578 | + */ |
|
579 | + #[Pure] |
|
580 | + #[TentativeType] |
|
581 | + public function isIterable(): bool {} |
|
582 | + |
|
583 | + /** |
|
584 | + * Checks whether it implements an interface. |
|
585 | + * |
|
586 | + * @link https://php.net/manual/en/reflectionclass.implementsinterface.php |
|
587 | + * @param string $interface The interface name. |
|
588 | + * @return bool Returns {@see true} on success or {@see false} on failure. |
|
589 | + */ |
|
590 | + #[TentativeType] |
|
591 | + public function implementsInterface(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass|string'], default: '')] $interface): bool {} |
|
592 | + |
|
593 | + /** |
|
594 | + * Gets a <b>ReflectionExtension</b> object for the extension which defined the class |
|
595 | + * |
|
596 | + * @link https://php.net/manual/en/reflectionclass.getextension.php |
|
597 | + * @return ReflectionExtension|null A {@see ReflectionExtension} object representing |
|
598 | + * the extension which defined the class, or {@see null} for user-defined classes. |
|
599 | + */ |
|
600 | + #[Pure] |
|
601 | + #[TentativeType] |
|
602 | + public function getExtension(): ?ReflectionExtension {} |
|
603 | + |
|
604 | + /** |
|
605 | + * Gets the name of the extension which defined the class |
|
606 | + * |
|
607 | + * @link https://php.net/manual/en/reflectionclass.getextensionname.php |
|
608 | + * @return string|false The name of the extension which defined the class, |
|
609 | + * or {@see false} for user-defined classes. |
|
610 | + */ |
|
611 | + #[Pure] |
|
612 | + #[TentativeType] |
|
613 | + public function getExtensionName(): string|false {} |
|
614 | + |
|
615 | + /** |
|
616 | + * Checks if in namespace |
|
617 | + * |
|
618 | + * @link https://php.net/manual/en/reflectionclass.innamespace.php |
|
619 | + * @return bool {@see true} on success or {@see false} on failure. |
|
620 | + */ |
|
621 | + #[TentativeType] |
|
622 | + public function inNamespace(): bool {} |
|
623 | + |
|
624 | + /** |
|
625 | + * Gets namespace name |
|
626 | + * |
|
627 | + * @link https://php.net/manual/en/reflectionclass.getnamespacename.php |
|
628 | + * @return string The namespace name. |
|
629 | + */ |
|
630 | + #[Pure] |
|
631 | + #[TentativeType] |
|
632 | + public function getNamespaceName(): string {} |
|
633 | + |
|
634 | + /** |
|
635 | + * Gets short name |
|
636 | + * |
|
637 | + * @link https://php.net/manual/en/reflectionclass.getshortname.php |
|
638 | + * @return string The class short name. |
|
639 | + */ |
|
640 | + #[Pure] |
|
641 | + #[TentativeType] |
|
642 | + public function getShortName(): string {} |
|
643 | + |
|
644 | + /** |
|
645 | + * Returns an array of function attributes. |
|
646 | + * |
|
647 | + * @param string|null $name Name of an attribute class |
|
648 | + * @param int $flags Сriteria by which the attribute is searched. |
|
649 | + * @return ReflectionAttribute[] |
|
650 | + * @since 8.0 |
|
651 | + */ |
|
652 | + #[Pure] |
|
653 | + public function getAttributes(?string $name = null, int $flags = 0): array {} |
|
654 | + |
|
655 | + /** |
|
656 | + * Clones object |
|
657 | + * |
|
658 | + * @link https://php.net/manual/en/reflectionclass.clone.php |
|
659 | + * @return void |
|
660 | + */ |
|
661 | + final private function __clone(): void {} |
|
662 | + |
|
663 | + #[PhpStormStubsElementAvailable('8.1')] |
|
664 | + public function isEnum(): bool {} |
|
665 | 665 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | */ |
137 | 137 | #[Pure] |
138 | 138 | #[TentativeType] |
139 | - public function getFileName(): string|false {} |
|
139 | + public function getFileName(): string | false {} |
|
140 | 140 | |
141 | 141 | /** |
142 | 142 | * Gets starting line number |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | */ |
147 | 147 | #[Pure] |
148 | 148 | #[TentativeType] |
149 | - public function getStartLine(): int|false {} |
|
149 | + public function getStartLine(): int | false {} |
|
150 | 150 | |
151 | 151 | /** |
152 | 152 | * Gets end line |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | */ |
158 | 158 | #[Pure] |
159 | 159 | #[TentativeType] |
160 | - public function getEndLine(): int|false {} |
|
160 | + public function getEndLine(): int | false {} |
|
161 | 161 | |
162 | 162 | /** |
163 | 163 | * Gets doc comments |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | */ |
168 | 168 | #[Pure] |
169 | 169 | #[TentativeType] |
170 | - public function getDocComment(): string|false {} |
|
170 | + public function getDocComment(): string | false {} |
|
171 | 171 | |
172 | 172 | /** |
173 | 173 | * Gets the constructor of the class |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | * @return bool Returns {@see true} if it has the method, otherwise {@see false} |
189 | 189 | */ |
190 | 190 | #[TentativeType] |
191 | - public function hasMethod(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {} |
|
191 | + public function hasMethod(#[LanguageLevelTypeAware(['8.0' => 'string'], default : '')] $name): bool {} |
|
192 | 192 | |
193 | 193 | /** |
194 | 194 | * Gets a <b>ReflectionMethod</b> for a class method. |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | */ |
201 | 201 | #[Pure] |
202 | 202 | #[TentativeType] |
203 | - public function getMethod(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): ReflectionMethod {} |
|
203 | + public function getMethod(#[LanguageLevelTypeAware(['8.0' => 'string'], default : '')] $name): ReflectionMethod {} |
|
204 | 204 | |
205 | 205 | /** |
206 | 206 | * Gets an array of methods for the class. |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | #[Pure] |
215 | 215 | #[TentativeType] |
216 | - public function getMethods(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $filter = null): array {} |
|
216 | + public function getMethods(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default : '')] $filter = null): array {} |
|
217 | 217 | |
218 | 218 | /** |
219 | 219 | * Checks if property is defined |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * @return bool Returns {@see true} if it has the property, otherwise {@see false} |
224 | 224 | */ |
225 | 225 | #[TentativeType] |
226 | - public function hasProperty(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {} |
|
226 | + public function hasProperty(#[LanguageLevelTypeAware(['8.0' => 'string'], default : '')] $name): bool {} |
|
227 | 227 | |
228 | 228 | /** |
229 | 229 | * Gets a <b>ReflectionProperty</b> for a class's property |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | */ |
236 | 236 | #[Pure] |
237 | 237 | #[TentativeType] |
238 | - public function getProperty(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): ReflectionProperty {} |
|
238 | + public function getProperty(#[LanguageLevelTypeAware(['8.0' => 'string'], default : '')] $name): ReflectionProperty {} |
|
239 | 239 | |
240 | 240 | /** |
241 | 241 | * Gets properties |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | */ |
249 | 249 | #[Pure] |
250 | 250 | #[TentativeType] |
251 | - public function getProperties(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $filter = null): array {} |
|
251 | + public function getProperties(#[LanguageLevelTypeAware(['8.0' => 'int|null'], default : '')] $filter = null): array {} |
|
252 | 252 | |
253 | 253 | /** |
254 | 254 | * Gets a ReflectionClassConstant for a class's property |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | */ |
261 | 261 | #[Pure] |
262 | 262 | #[TentativeType] |
263 | - public function getReflectionConstant(string $name): ReflectionClassConstant|false {} |
|
263 | + public function getReflectionConstant(string $name): ReflectionClassConstant | false {} |
|
264 | 264 | |
265 | 265 | /** |
266 | 266 | * Gets class constants |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | */ |
273 | 273 | #[Pure] |
274 | 274 | #[TentativeType] |
275 | - public function getReflectionConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC|ReflectionClassConstant::IS_PROTECTED|ReflectionClassConstant::IS_PRIVATE): array {} |
|
275 | + public function getReflectionConstants(#[PhpStormStubsElementAvailable(from : '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC | ReflectionClassConstant::IS_PROTECTED | ReflectionClassConstant::IS_PRIVATE): array {} |
|
276 | 276 | |
277 | 277 | /** |
278 | 278 | * Checks if constant is defined |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | * @return bool Returns {@see true} if the constant is defined, otherwise {@see false} |
283 | 283 | */ |
284 | 284 | #[TentativeType] |
285 | - public function hasConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): bool {} |
|
285 | + public function hasConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], default : '')] $name): bool {} |
|
286 | 286 | |
287 | 287 | /** |
288 | 288 | * Gets constants |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | */ |
295 | 295 | #[Pure] |
296 | 296 | #[TentativeType] |
297 | - public function getConstants(#[PhpStormStubsElementAvailable(from: '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC|ReflectionClassConstant::IS_PROTECTED|ReflectionClassConstant::IS_PRIVATE): array {} |
|
297 | + public function getConstants(#[PhpStormStubsElementAvailable(from : '8.0')] ?int $filter = ReflectionClassConstant::IS_PUBLIC | ReflectionClassConstant::IS_PROTECTED | ReflectionClassConstant::IS_PRIVATE): array {} |
|
298 | 298 | |
299 | 299 | /** |
300 | 300 | * Gets defined constant |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | */ |
307 | 307 | #[Pure] |
308 | 308 | #[TentativeType] |
309 | - public function getConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name): mixed {} |
|
309 | + public function getConstant(#[LanguageLevelTypeAware(['8.0' => 'string'], default : '')] $name): mixed {} |
|
310 | 310 | |
311 | 311 | /** |
312 | 312 | * Gets the interfaces |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | */ |
439 | 439 | #[Pure] |
440 | 440 | #[TentativeType] |
441 | - public function isInstance(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): bool {} |
|
441 | + public function isInstance(#[LanguageLevelTypeAware(['8.0' => 'object'], default : '')] $object): bool {} |
|
442 | 442 | |
443 | 443 | /** |
444 | 444 | * Creates a new class instance from given arguments. |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | */ |
490 | 490 | #[Pure] |
491 | 491 | #[TentativeType] |
492 | - public function getParentClass(): ReflectionClass|false {} |
|
492 | + public function getParentClass(): ReflectionClass | false {} |
|
493 | 493 | |
494 | 494 | /** |
495 | 495 | * Checks if a subclass |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | */ |
502 | 502 | #[Pure] |
503 | 503 | #[TentativeType] |
504 | - public function isSubclassOf(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass|string'], default: '')] $class): bool {} |
|
504 | + public function isSubclassOf(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass|string'], default : '')] $class): bool {} |
|
505 | 505 | |
506 | 506 | /** |
507 | 507 | * Gets static properties |
@@ -527,8 +527,8 @@ discard block |
||
527 | 527 | #[Pure] |
528 | 528 | #[TentativeType] |
529 | 529 | public function getStaticPropertyValue( |
530 | - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name, |
|
531 | - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $default = null |
|
530 | + #[LanguageLevelTypeAware(['8.0' => 'string'], default : '')] $name, |
|
531 | + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default : '')] $default = null |
|
532 | 532 | ): mixed {} |
533 | 533 | |
534 | 534 | /** |
@@ -541,8 +541,8 @@ discard block |
||
541 | 541 | */ |
542 | 542 | #[TentativeType] |
543 | 543 | public function setStaticPropertyValue( |
544 | - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $name, |
|
545 | - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value |
|
544 | + #[LanguageLevelTypeAware(['8.0' => 'string'], default : '')] $name, |
|
545 | + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default : '')] $value |
|
546 | 546 | ): void {} |
547 | 547 | |
548 | 548 | /** |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | * @return bool Returns {@see true} on success or {@see false} on failure. |
589 | 589 | */ |
590 | 590 | #[TentativeType] |
591 | - public function implementsInterface(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass|string'], default: '')] $interface): bool {} |
|
591 | + public function implementsInterface(#[LanguageLevelTypeAware(['8.0' => 'ReflectionClass|string'], default : '')] $interface): bool {} |
|
592 | 592 | |
593 | 593 | /** |
594 | 594 | * Gets a <b>ReflectionExtension</b> object for the extension which defined the class |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | */ |
611 | 611 | #[Pure] |
612 | 612 | #[TentativeType] |
613 | - public function getExtensionName(): string|false {} |
|
613 | + public function getExtensionName(): string | false {} |
|
614 | 614 | |
615 | 615 | /** |
616 | 616 | * Checks if in namespace |
@@ -12,8 +12,7 @@ |
||
12 | 12 | * |
13 | 13 | * @link https://php.net/manual/en/class.reflectionclass.php |
14 | 14 | */ |
15 | -class ReflectionClass implements Reflector |
|
16 | -{ |
|
15 | +class ReflectionClass implements Reflector { |
|
17 | 16 | /** |
18 | 17 | * @var string Name of the class, same as calling the {@see ReflectionClass::getName()} method |
19 | 18 | */ |
@@ -14,92 +14,92 @@ |
||
14 | 14 | */ |
15 | 15 | class ReflectionFunction extends ReflectionFunctionAbstract |
16 | 16 | { |
17 | - /** |
|
18 | - * @var string Function name, same as calling the {@see ReflectionFunction::getName()} method |
|
19 | - */ |
|
20 | - #[Immutable] |
|
21 | - public $name; |
|
17 | + /** |
|
18 | + * @var string Function name, same as calling the {@see ReflectionFunction::getName()} method |
|
19 | + */ |
|
20 | + #[Immutable] |
|
21 | + public $name; |
|
22 | 22 | |
23 | - /** |
|
24 | - * Indicates deprecated functions. |
|
25 | - * |
|
26 | - * @link https://www.php.net/manual/en/class.reflectionfunction.php#reflectionfunction.constants.is-deprecated |
|
27 | - */ |
|
28 | - public const IS_DEPRECATED = 2048; |
|
23 | + /** |
|
24 | + * Indicates deprecated functions. |
|
25 | + * |
|
26 | + * @link https://www.php.net/manual/en/class.reflectionfunction.php#reflectionfunction.constants.is-deprecated |
|
27 | + */ |
|
28 | + public const IS_DEPRECATED = 2048; |
|
29 | 29 | |
30 | - /** |
|
31 | - * Constructs a ReflectionFunction object |
|
32 | - * |
|
33 | - * @link https://php.net/manual/en/reflectionfunction.construct.php |
|
34 | - * @param string|Closure $function The name of the function to reflect or a closure. |
|
35 | - * @throws ReflectionException if the function does not exist. |
|
36 | - */ |
|
37 | - public function __construct(#[LanguageLevelTypeAware(['8.0' => 'Closure|string'], default: '')] $function) {} |
|
30 | + /** |
|
31 | + * Constructs a ReflectionFunction object |
|
32 | + * |
|
33 | + * @link https://php.net/manual/en/reflectionfunction.construct.php |
|
34 | + * @param string|Closure $function The name of the function to reflect or a closure. |
|
35 | + * @throws ReflectionException if the function does not exist. |
|
36 | + */ |
|
37 | + public function __construct(#[LanguageLevelTypeAware(['8.0' => 'Closure|string'], default: '')] $function) {} |
|
38 | 38 | |
39 | - /** |
|
40 | - * Returns the string representation of the ReflectionFunction object. |
|
41 | - * |
|
42 | - * @link https://php.net/manual/en/reflectionfunction.tostring.php |
|
43 | - */ |
|
44 | - #[TentativeType] |
|
45 | - public function __toString(): string {} |
|
39 | + /** |
|
40 | + * Returns the string representation of the ReflectionFunction object. |
|
41 | + * |
|
42 | + * @link https://php.net/manual/en/reflectionfunction.tostring.php |
|
43 | + */ |
|
44 | + #[TentativeType] |
|
45 | + public function __toString(): string {} |
|
46 | 46 | |
47 | - /** |
|
48 | - * Exports function |
|
49 | - * |
|
50 | - * @link https://php.net/manual/en/reflectionfunction.export.php |
|
51 | - * @param string $name The reflection to export. |
|
52 | - * @param bool $return Setting to {@see true} will return the |
|
53 | - * export, as opposed to emitting it. Setting to {@see false} (the default) |
|
54 | - * will do the opposite. |
|
55 | - * @return string|null If the $return parameter is set to {@see true}, then |
|
56 | - * the export is returned as a string, otherwise {@see null} is returned. |
|
57 | - * @removed 8.0 |
|
58 | - */ |
|
59 | - #[Deprecated(since: '7.4')] |
|
60 | - public static function export($name, $return = false) {} |
|
47 | + /** |
|
48 | + * Exports function |
|
49 | + * |
|
50 | + * @link https://php.net/manual/en/reflectionfunction.export.php |
|
51 | + * @param string $name The reflection to export. |
|
52 | + * @param bool $return Setting to {@see true} will return the |
|
53 | + * export, as opposed to emitting it. Setting to {@see false} (the default) |
|
54 | + * will do the opposite. |
|
55 | + * @return string|null If the $return parameter is set to {@see true}, then |
|
56 | + * the export is returned as a string, otherwise {@see null} is returned. |
|
57 | + * @removed 8.0 |
|
58 | + */ |
|
59 | + #[Deprecated(since: '7.4')] |
|
60 | + public static function export($name, $return = false) {} |
|
61 | 61 | |
62 | - /** |
|
63 | - * Checks if function is disabled |
|
64 | - * |
|
65 | - * @link https://php.net/manual/en/reflectionfunction.isdisabled.php |
|
66 | - * @return bool {@see true} if it's disable, otherwise {@see false} |
|
67 | - */ |
|
68 | - #[Deprecated(since: '8.0')] |
|
69 | - #[Pure] |
|
70 | - #[TentativeType] |
|
71 | - public function isDisabled(): bool {} |
|
62 | + /** |
|
63 | + * Checks if function is disabled |
|
64 | + * |
|
65 | + * @link https://php.net/manual/en/reflectionfunction.isdisabled.php |
|
66 | + * @return bool {@see true} if it's disable, otherwise {@see false} |
|
67 | + */ |
|
68 | + #[Deprecated(since: '8.0')] |
|
69 | + #[Pure] |
|
70 | + #[TentativeType] |
|
71 | + public function isDisabled(): bool {} |
|
72 | 72 | |
73 | - /** |
|
74 | - * Invokes function |
|
75 | - * |
|
76 | - * @link https://www.php.net/manual/en/reflectionfunction.invoke.php |
|
77 | - * @param mixed ...$args [optional] The passed in argument list. It accepts a |
|
78 | - * variable number of arguments which are passed to the function much |
|
79 | - * like {@see call_user_func} is. |
|
80 | - * @return mixed Returns the result of the invoked function call. |
|
81 | - */ |
|
82 | - #[TentativeType] |
|
83 | - public function invoke(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$args): mixed {} |
|
73 | + /** |
|
74 | + * Invokes function |
|
75 | + * |
|
76 | + * @link https://www.php.net/manual/en/reflectionfunction.invoke.php |
|
77 | + * @param mixed ...$args [optional] The passed in argument list. It accepts a |
|
78 | + * variable number of arguments which are passed to the function much |
|
79 | + * like {@see call_user_func} is. |
|
80 | + * @return mixed Returns the result of the invoked function call. |
|
81 | + */ |
|
82 | + #[TentativeType] |
|
83 | + public function invoke(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$args): mixed {} |
|
84 | 84 | |
85 | - /** |
|
86 | - * Invokes function args |
|
87 | - * |
|
88 | - * @link https://php.net/manual/en/reflectionfunction.invokeargs.php |
|
89 | - * @param array $args The passed arguments to the function as an array, much |
|
90 | - * like {@see call_user_func_array} works. |
|
91 | - * @return mixed the result of the invoked function |
|
92 | - */ |
|
93 | - #[TentativeType] |
|
94 | - public function invokeArgs(array $args): mixed {} |
|
85 | + /** |
|
86 | + * Invokes function args |
|
87 | + * |
|
88 | + * @link https://php.net/manual/en/reflectionfunction.invokeargs.php |
|
89 | + * @param array $args The passed arguments to the function as an array, much |
|
90 | + * like {@see call_user_func_array} works. |
|
91 | + * @return mixed the result of the invoked function |
|
92 | + */ |
|
93 | + #[TentativeType] |
|
94 | + public function invokeArgs(array $args): mixed {} |
|
95 | 95 | |
96 | - /** |
|
97 | - * Returns a dynamically created closure for the function |
|
98 | - * |
|
99 | - * @link https://php.net/manual/en/reflectionfunction.getclosure.php |
|
100 | - * @return Closure Returns {@see Closure} or {@see null} in case of an error. |
|
101 | - */ |
|
102 | - #[Pure] |
|
103 | - #[TentativeType] |
|
104 | - public function getClosure(): Closure {} |
|
96 | + /** |
|
97 | + * Returns a dynamically created closure for the function |
|
98 | + * |
|
99 | + * @link https://php.net/manual/en/reflectionfunction.getclosure.php |
|
100 | + * @return Closure Returns {@see Closure} or {@see null} in case of an error. |
|
101 | + */ |
|
102 | + #[Pure] |
|
103 | + #[TentativeType] |
|
104 | + public function getClosure(): Closure {} |
|
105 | 105 | } |
@@ -12,8 +12,7 @@ |
||
12 | 12 | * |
13 | 13 | * @link https://php.net/manual/en/class.reflectionfunction.php |
14 | 14 | */ |
15 | -class ReflectionFunction extends ReflectionFunctionAbstract |
|
16 | -{ |
|
15 | +class ReflectionFunction extends ReflectionFunctionAbstract { |
|
17 | 16 | /** |
18 | 17 | * @var string Function name, same as calling the {@see ReflectionFunction::getName()} method |
19 | 18 | */ |
@@ -14,283 +14,283 @@ |
||
14 | 14 | */ |
15 | 15 | class ReflectionParameter implements Reflector |
16 | 16 | { |
17 | - /** |
|
18 | - * @var string Name of the parameter, same as calling the {@see ReflectionParameter::getName()} method |
|
19 | - */ |
|
20 | - #[Immutable] |
|
21 | - #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] |
|
22 | - public $name; |
|
17 | + /** |
|
18 | + * @var string Name of the parameter, same as calling the {@see ReflectionParameter::getName()} method |
|
19 | + */ |
|
20 | + #[Immutable] |
|
21 | + #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] |
|
22 | + public $name; |
|
23 | 23 | |
24 | - /** |
|
25 | - * Construct |
|
26 | - * |
|
27 | - * @link https://php.net/manual/en/reflectionparameter.construct.php |
|
28 | - * @param callable $function The function to reflect parameters from. |
|
29 | - * @param string|int $param Either an integer specifying the position |
|
30 | - * of the parameter (starting with zero), or a the parameter name as string. |
|
31 | - * @throws ReflectionException if the function or parameter does not exist. |
|
32 | - */ |
|
33 | - public function __construct($function, #[LanguageLevelTypeAware(['8.0' => 'string|int'], default: '')] $param) {} |
|
24 | + /** |
|
25 | + * Construct |
|
26 | + * |
|
27 | + * @link https://php.net/manual/en/reflectionparameter.construct.php |
|
28 | + * @param callable $function The function to reflect parameters from. |
|
29 | + * @param string|int $param Either an integer specifying the position |
|
30 | + * of the parameter (starting with zero), or a the parameter name as string. |
|
31 | + * @throws ReflectionException if the function or parameter does not exist. |
|
32 | + */ |
|
33 | + public function __construct($function, #[LanguageLevelTypeAware(['8.0' => 'string|int'], default: '')] $param) {} |
|
34 | 34 | |
35 | - /** |
|
36 | - * Exports |
|
37 | - * |
|
38 | - * @link https://php.net/manual/en/reflectionparameter.export.php |
|
39 | - * @param string $function The function name. |
|
40 | - * @param string $parameter The parameter name. |
|
41 | - * @param bool $return Setting to {@see true} will return the export, |
|
42 | - * as opposed to emitting it. Setting to {@see false} (the default) will do the |
|
43 | - * opposite. |
|
44 | - * @return string|null The exported reflection. |
|
45 | - * @removed 8.0 |
|
46 | - */ |
|
47 | - #[Deprecated(since: '7.4')] |
|
48 | - public static function export($function, $parameter, $return = false) {} |
|
35 | + /** |
|
36 | + * Exports |
|
37 | + * |
|
38 | + * @link https://php.net/manual/en/reflectionparameter.export.php |
|
39 | + * @param string $function The function name. |
|
40 | + * @param string $parameter The parameter name. |
|
41 | + * @param bool $return Setting to {@see true} will return the export, |
|
42 | + * as opposed to emitting it. Setting to {@see false} (the default) will do the |
|
43 | + * opposite. |
|
44 | + * @return string|null The exported reflection. |
|
45 | + * @removed 8.0 |
|
46 | + */ |
|
47 | + #[Deprecated(since: '7.4')] |
|
48 | + public static function export($function, $parameter, $return = false) {} |
|
49 | 49 | |
50 | - /** |
|
51 | - * Returns the string representation of the ReflectionParameter object. |
|
52 | - * |
|
53 | - * @link https://php.net/manual/en/reflectionparameter.tostring.php |
|
54 | - * @return string |
|
55 | - */ |
|
56 | - #[TentativeType] |
|
57 | - public function __toString(): string {} |
|
50 | + /** |
|
51 | + * Returns the string representation of the ReflectionParameter object. |
|
52 | + * |
|
53 | + * @link https://php.net/manual/en/reflectionparameter.tostring.php |
|
54 | + * @return string |
|
55 | + */ |
|
56 | + #[TentativeType] |
|
57 | + public function __toString(): string {} |
|
58 | 58 | |
59 | - /** |
|
60 | - * Gets parameter name |
|
61 | - * |
|
62 | - * @link https://php.net/manual/en/reflectionparameter.getname.php |
|
63 | - * @return string The name of the reflected parameter. |
|
64 | - */ |
|
65 | - #[Pure] |
|
66 | - #[TentativeType] |
|
67 | - public function getName(): string {} |
|
59 | + /** |
|
60 | + * Gets parameter name |
|
61 | + * |
|
62 | + * @link https://php.net/manual/en/reflectionparameter.getname.php |
|
63 | + * @return string The name of the reflected parameter. |
|
64 | + */ |
|
65 | + #[Pure] |
|
66 | + #[TentativeType] |
|
67 | + public function getName(): string {} |
|
68 | 68 | |
69 | - /** |
|
70 | - * Checks if passed by reference |
|
71 | - * |
|
72 | - * @link https://php.net/manual/en/reflectionparameter.ispassedbyreference.php |
|
73 | - * @return bool {@see true} if the parameter is passed in by reference, otherwise {@see false} |
|
74 | - */ |
|
75 | - #[Pure] |
|
76 | - #[TentativeType] |
|
77 | - public function isPassedByReference(): bool {} |
|
69 | + /** |
|
70 | + * Checks if passed by reference |
|
71 | + * |
|
72 | + * @link https://php.net/manual/en/reflectionparameter.ispassedbyreference.php |
|
73 | + * @return bool {@see true} if the parameter is passed in by reference, otherwise {@see false} |
|
74 | + */ |
|
75 | + #[Pure] |
|
76 | + #[TentativeType] |
|
77 | + public function isPassedByReference(): bool {} |
|
78 | 78 | |
79 | - /** |
|
80 | - * Returns whether this parameter can be passed by value |
|
81 | - * |
|
82 | - * @link https://php.net/manual/en/reflectionparameter.canbepassedbyvalue.php |
|
83 | - * @return bool|null {@see true} if the parameter can be passed by value, {@see false} otherwise. |
|
84 | - * Returns {@see null} in case of an error. |
|
85 | - * @since 5.4 |
|
86 | - */ |
|
87 | - #[TentativeType] |
|
88 | - public function canBePassedByValue(): bool {} |
|
79 | + /** |
|
80 | + * Returns whether this parameter can be passed by value |
|
81 | + * |
|
82 | + * @link https://php.net/manual/en/reflectionparameter.canbepassedbyvalue.php |
|
83 | + * @return bool|null {@see true} if the parameter can be passed by value, {@see false} otherwise. |
|
84 | + * Returns {@see null} in case of an error. |
|
85 | + * @since 5.4 |
|
86 | + */ |
|
87 | + #[TentativeType] |
|
88 | + public function canBePassedByValue(): bool {} |
|
89 | 89 | |
90 | - /** |
|
91 | - * Gets declaring function |
|
92 | - * |
|
93 | - * @link https://php.net/manual/en/reflectionparameter.getdeclaringfunction.php |
|
94 | - * @return ReflectionFunctionAbstract A {@see ReflectionFunctionAbstract} object. |
|
95 | - * @since 5.2.3 |
|
96 | - */ |
|
97 | - #[Pure] |
|
98 | - #[TentativeType] |
|
99 | - public function getDeclaringFunction(): ReflectionFunctionAbstract {} |
|
90 | + /** |
|
91 | + * Gets declaring function |
|
92 | + * |
|
93 | + * @link https://php.net/manual/en/reflectionparameter.getdeclaringfunction.php |
|
94 | + * @return ReflectionFunctionAbstract A {@see ReflectionFunctionAbstract} object. |
|
95 | + * @since 5.2.3 |
|
96 | + */ |
|
97 | + #[Pure] |
|
98 | + #[TentativeType] |
|
99 | + public function getDeclaringFunction(): ReflectionFunctionAbstract {} |
|
100 | 100 | |
101 | - /** |
|
102 | - * Gets declaring class |
|
103 | - * |
|
104 | - * @link https://php.net/manual/en/reflectionparameter.getdeclaringclass.php |
|
105 | - * @return ReflectionClass|null A {@see ReflectionClass} object or {@see null} if |
|
106 | - * called on function. |
|
107 | - */ |
|
108 | - #[Pure] |
|
109 | - #[TentativeType] |
|
110 | - public function getDeclaringClass(): ?ReflectionClass {} |
|
101 | + /** |
|
102 | + * Gets declaring class |
|
103 | + * |
|
104 | + * @link https://php.net/manual/en/reflectionparameter.getdeclaringclass.php |
|
105 | + * @return ReflectionClass|null A {@see ReflectionClass} object or {@see null} if |
|
106 | + * called on function. |
|
107 | + */ |
|
108 | + #[Pure] |
|
109 | + #[TentativeType] |
|
110 | + public function getDeclaringClass(): ?ReflectionClass {} |
|
111 | 111 | |
112 | - /** |
|
113 | - * Gets the class type hinted for the parameter as a ReflectionClass object. |
|
114 | - * |
|
115 | - * @link https://php.net/manual/en/reflectionparameter.getclass.php |
|
116 | - * @return ReflectionClass|null A {@see ReflectionClass} object. |
|
117 | - * @see ReflectionParameter::getType() |
|
118 | - */ |
|
119 | - #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")] |
|
120 | - #[Pure] |
|
121 | - #[TentativeType] |
|
122 | - public function getClass(): ?ReflectionClass {} |
|
112 | + /** |
|
113 | + * Gets the class type hinted for the parameter as a ReflectionClass object. |
|
114 | + * |
|
115 | + * @link https://php.net/manual/en/reflectionparameter.getclass.php |
|
116 | + * @return ReflectionClass|null A {@see ReflectionClass} object. |
|
117 | + * @see ReflectionParameter::getType() |
|
118 | + */ |
|
119 | + #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")] |
|
120 | + #[Pure] |
|
121 | + #[TentativeType] |
|
122 | + public function getClass(): ?ReflectionClass {} |
|
123 | 123 | |
124 | - /** |
|
125 | - * Checks if the parameter has a type associated with it. |
|
126 | - * |
|
127 | - * @link https://php.net/manual/en/reflectionparameter.hastype.php |
|
128 | - * @return bool {@see true} if a type is specified, {@see false} otherwise. |
|
129 | - * @since 7.0 |
|
130 | - */ |
|
131 | - #[TentativeType] |
|
132 | - public function hasType(): bool {} |
|
124 | + /** |
|
125 | + * Checks if the parameter has a type associated with it. |
|
126 | + * |
|
127 | + * @link https://php.net/manual/en/reflectionparameter.hastype.php |
|
128 | + * @return bool {@see true} if a type is specified, {@see false} otherwise. |
|
129 | + * @since 7.0 |
|
130 | + */ |
|
131 | + #[TentativeType] |
|
132 | + public function hasType(): bool {} |
|
133 | 133 | |
134 | - /** |
|
135 | - * Gets a parameter's type |
|
136 | - * |
|
137 | - * @link https://php.net/manual/en/reflectionparameter.gettype.php |
|
138 | - * @return ReflectionType|null Returns a {@see ReflectionType} object if a |
|
139 | - * parameter type is specified, {@see null} otherwise. |
|
140 | - * @since 7.0 |
|
141 | - */ |
|
142 | - #[Pure] |
|
143 | - #[LanguageLevelTypeAware( |
|
144 | - [ |
|
145 | - '7.1' => 'ReflectionNamedType|null', |
|
146 | - '8.0' => 'ReflectionNamedType|ReflectionUnionType|null', |
|
147 | - '8.1' => 'ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null' |
|
148 | - ], |
|
149 | - default: 'ReflectionType|null' |
|
150 | - )] |
|
151 | - #[TentativeType] |
|
152 | - public function getType(): ?ReflectionType {} |
|
134 | + /** |
|
135 | + * Gets a parameter's type |
|
136 | + * |
|
137 | + * @link https://php.net/manual/en/reflectionparameter.gettype.php |
|
138 | + * @return ReflectionType|null Returns a {@see ReflectionType} object if a |
|
139 | + * parameter type is specified, {@see null} otherwise. |
|
140 | + * @since 7.0 |
|
141 | + */ |
|
142 | + #[Pure] |
|
143 | + #[LanguageLevelTypeAware( |
|
144 | + [ |
|
145 | + '7.1' => 'ReflectionNamedType|null', |
|
146 | + '8.0' => 'ReflectionNamedType|ReflectionUnionType|null', |
|
147 | + '8.1' => 'ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null' |
|
148 | + ], |
|
149 | + default: 'ReflectionType|null' |
|
150 | + )] |
|
151 | + #[TentativeType] |
|
152 | + public function getType(): ?ReflectionType {} |
|
153 | 153 | |
154 | - /** |
|
155 | - * Checks if parameter expects an array |
|
156 | - * |
|
157 | - * @link https://php.net/manual/en/reflectionparameter.isarray.php |
|
158 | - * @return bool {@see true} if an array is expected, {@see false} otherwise. |
|
159 | - * @see ReflectionParameter::getType() |
|
160 | - */ |
|
161 | - #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")] |
|
162 | - #[Pure] |
|
163 | - #[TentativeType] |
|
164 | - public function isArray(): bool {} |
|
154 | + /** |
|
155 | + * Checks if parameter expects an array |
|
156 | + * |
|
157 | + * @link https://php.net/manual/en/reflectionparameter.isarray.php |
|
158 | + * @return bool {@see true} if an array is expected, {@see false} otherwise. |
|
159 | + * @see ReflectionParameter::getType() |
|
160 | + */ |
|
161 | + #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")] |
|
162 | + #[Pure] |
|
163 | + #[TentativeType] |
|
164 | + public function isArray(): bool {} |
|
165 | 165 | |
166 | - /** |
|
167 | - * Returns whether parameter MUST be callable |
|
168 | - * |
|
169 | - * @link https://php.net/manual/en/reflectionparameter.iscallable.php |
|
170 | - * @return bool|null Returns {@see true} if the parameter is callable, {@see false} |
|
171 | - * if it is not or {@see null} on failure. |
|
172 | - * @since 5.4 |
|
173 | - * @see ReflectionParameter::getType() |
|
174 | - */ |
|
175 | - #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")] |
|
176 | - #[Pure] |
|
177 | - #[TentativeType] |
|
178 | - public function isCallable(): bool {} |
|
166 | + /** |
|
167 | + * Returns whether parameter MUST be callable |
|
168 | + * |
|
169 | + * @link https://php.net/manual/en/reflectionparameter.iscallable.php |
|
170 | + * @return bool|null Returns {@see true} if the parameter is callable, {@see false} |
|
171 | + * if it is not or {@see null} on failure. |
|
172 | + * @since 5.4 |
|
173 | + * @see ReflectionParameter::getType() |
|
174 | + */ |
|
175 | + #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")] |
|
176 | + #[Pure] |
|
177 | + #[TentativeType] |
|
178 | + public function isCallable(): bool {} |
|
179 | 179 | |
180 | - /** |
|
181 | - * Checks if null is allowed |
|
182 | - * |
|
183 | - * @link https://php.net/manual/en/reflectionparameter.allowsnull.php |
|
184 | - * @return bool Returns {@see true} if {@see null} is allowed, |
|
185 | - * otherwise {@see false} |
|
186 | - */ |
|
187 | - #[TentativeType] |
|
188 | - public function allowsNull(): bool {} |
|
180 | + /** |
|
181 | + * Checks if null is allowed |
|
182 | + * |
|
183 | + * @link https://php.net/manual/en/reflectionparameter.allowsnull.php |
|
184 | + * @return bool Returns {@see true} if {@see null} is allowed, |
|
185 | + * otherwise {@see false} |
|
186 | + */ |
|
187 | + #[TentativeType] |
|
188 | + public function allowsNull(): bool {} |
|
189 | 189 | |
190 | - /** |
|
191 | - * Gets parameter position |
|
192 | - * |
|
193 | - * @link https://php.net/manual/en/reflectionparameter.getposition.php |
|
194 | - * @return int The position of the parameter, left to right, starting at position #0. |
|
195 | - * @since 5.2.3 |
|
196 | - */ |
|
197 | - #[Pure] |
|
198 | - #[TentativeType] |
|
199 | - public function getPosition(): int {} |
|
190 | + /** |
|
191 | + * Gets parameter position |
|
192 | + * |
|
193 | + * @link https://php.net/manual/en/reflectionparameter.getposition.php |
|
194 | + * @return int The position of the parameter, left to right, starting at position #0. |
|
195 | + * @since 5.2.3 |
|
196 | + */ |
|
197 | + #[Pure] |
|
198 | + #[TentativeType] |
|
199 | + public function getPosition(): int {} |
|
200 | 200 | |
201 | - /** |
|
202 | - * Checks if optional |
|
203 | - * |
|
204 | - * @link https://php.net/manual/en/reflectionparameter.isoptional.php |
|
205 | - * @return bool Returns {@see true} if the parameter is optional, otherwise {@see false} |
|
206 | - * @since 5.0.3 |
|
207 | - */ |
|
208 | - #[Pure] |
|
209 | - #[TentativeType] |
|
210 | - public function isOptional(): bool {} |
|
201 | + /** |
|
202 | + * Checks if optional |
|
203 | + * |
|
204 | + * @link https://php.net/manual/en/reflectionparameter.isoptional.php |
|
205 | + * @return bool Returns {@see true} if the parameter is optional, otherwise {@see false} |
|
206 | + * @since 5.0.3 |
|
207 | + */ |
|
208 | + #[Pure] |
|
209 | + #[TentativeType] |
|
210 | + public function isOptional(): bool {} |
|
211 | 211 | |
212 | - /** |
|
213 | - * Checks if a default value is available |
|
214 | - * |
|
215 | - * @link https://php.net/manual/en/reflectionparameter.isdefaultvalueavailable.php |
|
216 | - * @return bool Returns {@see true} if a default value is available, otherwise {@see false} |
|
217 | - * @since 5.0.3 |
|
218 | - */ |
|
219 | - #[Pure] |
|
220 | - #[TentativeType] |
|
221 | - public function isDefaultValueAvailable(): bool {} |
|
212 | + /** |
|
213 | + * Checks if a default value is available |
|
214 | + * |
|
215 | + * @link https://php.net/manual/en/reflectionparameter.isdefaultvalueavailable.php |
|
216 | + * @return bool Returns {@see true} if a default value is available, otherwise {@see false} |
|
217 | + * @since 5.0.3 |
|
218 | + */ |
|
219 | + #[Pure] |
|
220 | + #[TentativeType] |
|
221 | + public function isDefaultValueAvailable(): bool {} |
|
222 | 222 | |
223 | - /** |
|
224 | - * Gets default parameter value |
|
225 | - * |
|
226 | - * @link https://php.net/manual/en/reflectionparameter.getdefaultvalue.php |
|
227 | - * @return mixed The parameters default value. |
|
228 | - * @throws ReflectionException if the parameter is not optional |
|
229 | - * @since 5.0.3 |
|
230 | - */ |
|
231 | - #[Pure] |
|
232 | - #[TentativeType] |
|
233 | - public function getDefaultValue(): mixed {} |
|
223 | + /** |
|
224 | + * Gets default parameter value |
|
225 | + * |
|
226 | + * @link https://php.net/manual/en/reflectionparameter.getdefaultvalue.php |
|
227 | + * @return mixed The parameters default value. |
|
228 | + * @throws ReflectionException if the parameter is not optional |
|
229 | + * @since 5.0.3 |
|
230 | + */ |
|
231 | + #[Pure] |
|
232 | + #[TentativeType] |
|
233 | + public function getDefaultValue(): mixed {} |
|
234 | 234 | |
235 | - /** |
|
236 | - * Returns whether the default value of this parameter is constant |
|
237 | - * |
|
238 | - * @link https://php.net/manual/en/reflectionparameter.isdefaultvalueconstant.php |
|
239 | - * @return bool Returns {@see true} if the default value is constant, and {@see false} otherwise. |
|
240 | - * @since 5.4.6 |
|
241 | - */ |
|
242 | - #[Pure] |
|
243 | - #[TentativeType] |
|
244 | - public function isDefaultValueConstant(): bool {} |
|
235 | + /** |
|
236 | + * Returns whether the default value of this parameter is constant |
|
237 | + * |
|
238 | + * @link https://php.net/manual/en/reflectionparameter.isdefaultvalueconstant.php |
|
239 | + * @return bool Returns {@see true} if the default value is constant, and {@see false} otherwise. |
|
240 | + * @since 5.4.6 |
|
241 | + */ |
|
242 | + #[Pure] |
|
243 | + #[TentativeType] |
|
244 | + public function isDefaultValueConstant(): bool {} |
|
245 | 245 | |
246 | - /** |
|
247 | - * Returns the default value's constant name if default value is constant or null |
|
248 | - * |
|
249 | - * @link https://php.net/manual/en/reflectionparameter.getdefaultvalueconstantname.php |
|
250 | - * @return string|null Returns string on success or {@see null} on failure. |
|
251 | - * @throws ReflectionException if the parameter is not optional |
|
252 | - * @since 5.4.6 |
|
253 | - */ |
|
254 | - #[Pure] |
|
255 | - #[TentativeType] |
|
256 | - public function getDefaultValueConstantName(): ?string {} |
|
246 | + /** |
|
247 | + * Returns the default value's constant name if default value is constant or null |
|
248 | + * |
|
249 | + * @link https://php.net/manual/en/reflectionparameter.getdefaultvalueconstantname.php |
|
250 | + * @return string|null Returns string on success or {@see null} on failure. |
|
251 | + * @throws ReflectionException if the parameter is not optional |
|
252 | + * @since 5.4.6 |
|
253 | + */ |
|
254 | + #[Pure] |
|
255 | + #[TentativeType] |
|
256 | + public function getDefaultValueConstantName(): ?string {} |
|
257 | 257 | |
258 | - /** |
|
259 | - * Returns whether this function is variadic |
|
260 | - * |
|
261 | - * @link https://php.net/manual/en/reflectionparameter.isvariadic.php |
|
262 | - * @return bool Returns {@see true} if the function is variadic, otherwise {@see false} |
|
263 | - * @since 5.6 |
|
264 | - */ |
|
265 | - #[Pure] |
|
266 | - #[TentativeType] |
|
267 | - public function isVariadic(): bool {} |
|
258 | + /** |
|
259 | + * Returns whether this function is variadic |
|
260 | + * |
|
261 | + * @link https://php.net/manual/en/reflectionparameter.isvariadic.php |
|
262 | + * @return bool Returns {@see true} if the function is variadic, otherwise {@see false} |
|
263 | + * @since 5.6 |
|
264 | + */ |
|
265 | + #[Pure] |
|
266 | + #[TentativeType] |
|
267 | + public function isVariadic(): bool {} |
|
268 | 268 | |
269 | - /** |
|
270 | - * Returns information about whether the parameter is a promoted. |
|
271 | - * |
|
272 | - * @return bool Returns {@see true} if the parameter promoted or {@see false} instead |
|
273 | - * @since 8.0 |
|
274 | - */ |
|
275 | - #[Pure] |
|
276 | - public function isPromoted(): bool {} |
|
269 | + /** |
|
270 | + * Returns information about whether the parameter is a promoted. |
|
271 | + * |
|
272 | + * @return bool Returns {@see true} if the parameter promoted or {@see false} instead |
|
273 | + * @since 8.0 |
|
274 | + */ |
|
275 | + #[Pure] |
|
276 | + public function isPromoted(): bool {} |
|
277 | 277 | |
278 | - /** |
|
279 | - * Returns an array of parameter attributes. |
|
280 | - * |
|
281 | - * @param string|null $name Name of an attribute class |
|
282 | - * @param int $flags Сriteria by which the attribute is searched. |
|
283 | - * @return ReflectionAttribute[] |
|
284 | - * @since 8.0 |
|
285 | - */ |
|
286 | - #[Pure] |
|
287 | - public function getAttributes(?string $name = null, int $flags = 0): array {} |
|
278 | + /** |
|
279 | + * Returns an array of parameter attributes. |
|
280 | + * |
|
281 | + * @param string|null $name Name of an attribute class |
|
282 | + * @param int $flags Сriteria by which the attribute is searched. |
|
283 | + * @return ReflectionAttribute[] |
|
284 | + * @since 8.0 |
|
285 | + */ |
|
286 | + #[Pure] |
|
287 | + public function getAttributes(?string $name = null, int $flags = 0): array {} |
|
288 | 288 | |
289 | - /** |
|
290 | - * Clone |
|
291 | - * |
|
292 | - * @link https://php.net/manual/en/reflectionparameter.clone.php |
|
293 | - * @return void |
|
294 | - */ |
|
295 | - final private function __clone(): void {} |
|
289 | + /** |
|
290 | + * Clone |
|
291 | + * |
|
292 | + * @link https://php.net/manual/en/reflectionparameter.clone.php |
|
293 | + * @return void |
|
294 | + */ |
|
295 | + final private function __clone(): void {} |
|
296 | 296 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | * @return ReflectionClass|null A {@see ReflectionClass} object. |
117 | 117 | * @see ReflectionParameter::getType() |
118 | 118 | */ |
119 | - #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")] |
|
119 | + #[Deprecated(reason : "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since : "8.0")] |
|
120 | 120 | #[Pure] |
121 | 121 | #[TentativeType] |
122 | 122 | public function getClass(): ?ReflectionClass {} |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | '8.0' => 'ReflectionNamedType|ReflectionUnionType|null', |
147 | 147 | '8.1' => 'ReflectionNamedType|ReflectionUnionType|ReflectionIntersectionType|null' |
148 | 148 | ], |
149 | - default: 'ReflectionType|null' |
|
149 | + default : 'ReflectionType|null' |
|
150 | 150 | )] |
151 | 151 | #[TentativeType] |
152 | 152 | public function getType(): ?ReflectionType {} |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | * @return bool {@see true} if an array is expected, {@see false} otherwise. |
159 | 159 | * @see ReflectionParameter::getType() |
160 | 160 | */ |
161 | - #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")] |
|
161 | + #[Deprecated(reason : "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since : "8.0")] |
|
162 | 162 | #[Pure] |
163 | 163 | #[TentativeType] |
164 | 164 | public function isArray(): bool {} |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | * @since 5.4 |
173 | 173 | * @see ReflectionParameter::getType() |
174 | 174 | */ |
175 | - #[Deprecated(reason: "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since: "8.0")] |
|
175 | + #[Deprecated(reason : "Use ReflectionParameter::getType() and the ReflectionType APIs should be used instead.", since : "8.0")] |
|
176 | 176 | #[Pure] |
177 | 177 | #[TentativeType] |
178 | 178 | public function isCallable(): bool {} |
@@ -12,8 +12,7 @@ |
||
12 | 12 | * |
13 | 13 | * @link https://php.net/manual/en/class.reflectionparameter.php |
14 | 14 | */ |
15 | -class ReflectionParameter implements Reflector |
|
16 | -{ |
|
15 | +class ReflectionParameter implements Reflector { |
|
17 | 16 | /** |
18 | 17 | * @var string Name of the parameter, same as calling the {@see ReflectionParameter::getName()} method |
19 | 18 | */ |
@@ -11,26 +11,26 @@ |
||
11 | 11 | */ |
12 | 12 | class ReflectionObject extends ReflectionClass |
13 | 13 | { |
14 | - /** |
|
15 | - * Constructs a ReflectionObject |
|
16 | - * |
|
17 | - * @link https://php.net/manual/en/reflectionobject.construct.php |
|
18 | - * @param object $object An object instance. |
|
19 | - */ |
|
20 | - public function __construct(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object) {} |
|
14 | + /** |
|
15 | + * Constructs a ReflectionObject |
|
16 | + * |
|
17 | + * @link https://php.net/manual/en/reflectionobject.construct.php |
|
18 | + * @param object $object An object instance. |
|
19 | + */ |
|
20 | + public function __construct(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object) {} |
|
21 | 21 | |
22 | - /** |
|
23 | - * Export |
|
24 | - * |
|
25 | - * @link https://php.net/manual/en/reflectionobject.export.php |
|
26 | - * @param string $argument The reflection to export. |
|
27 | - * @param bool $return Setting to {@see true} will return the export, |
|
28 | - * as opposed to emitting it. Setting to {@see false} (the default) will do |
|
29 | - * the opposite. |
|
30 | - * @return string|null If the $return parameter is set to {@see true}, then |
|
31 | - * the export is returned as a string, otherwise {@see null} is returned. |
|
32 | - * @removed 8.0 |
|
33 | - */ |
|
34 | - #[Deprecated(since: '7.4')] |
|
35 | - public static function export($argument, $return = false) {} |
|
22 | + /** |
|
23 | + * Export |
|
24 | + * |
|
25 | + * @link https://php.net/manual/en/reflectionobject.export.php |
|
26 | + * @param string $argument The reflection to export. |
|
27 | + * @param bool $return Setting to {@see true} will return the export, |
|
28 | + * as opposed to emitting it. Setting to {@see false} (the default) will do |
|
29 | + * the opposite. |
|
30 | + * @return string|null If the $return parameter is set to {@see true}, then |
|
31 | + * the export is returned as a string, otherwise {@see null} is returned. |
|
32 | + * @removed 8.0 |
|
33 | + */ |
|
34 | + #[Deprecated(since: '7.4')] |
|
35 | + public static function export($argument, $return = false) {} |
|
36 | 36 | } |
@@ -9,8 +9,7 @@ |
||
9 | 9 | * |
10 | 10 | * @link https://php.net/manual/en/class.reflectionobject.php |
11 | 11 | */ |
12 | -class ReflectionObject extends ReflectionClass |
|
13 | -{ |
|
12 | +class ReflectionObject extends ReflectionClass { |
|
14 | 13 | /** |
15 | 14 | * Constructs a ReflectionObject |
16 | 15 | * |
@@ -15,284 +15,284 @@ |
||
15 | 15 | */ |
16 | 16 | class ReflectionMethod extends ReflectionFunctionAbstract |
17 | 17 | { |
18 | - /** |
|
19 | - * @var string Name of the method, same as calling the {@see ReflectionMethod::getName()} method |
|
20 | - */ |
|
21 | - #[Immutable] |
|
22 | - public $name; |
|
18 | + /** |
|
19 | + * @var string Name of the method, same as calling the {@see ReflectionMethod::getName()} method |
|
20 | + */ |
|
21 | + #[Immutable] |
|
22 | + public $name; |
|
23 | 23 | |
24 | - /** |
|
25 | - * @var string Fully qualified class name where this method was defined |
|
26 | - */ |
|
27 | - #[Immutable] |
|
28 | - #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] |
|
29 | - public $class; |
|
24 | + /** |
|
25 | + * @var string Fully qualified class name where this method was defined |
|
26 | + */ |
|
27 | + #[Immutable] |
|
28 | + #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] |
|
29 | + public $class; |
|
30 | 30 | |
31 | - /** |
|
32 | - * Indicates that the method is static. |
|
33 | - */ |
|
34 | - public const IS_STATIC = 16; |
|
31 | + /** |
|
32 | + * Indicates that the method is static. |
|
33 | + */ |
|
34 | + public const IS_STATIC = 16; |
|
35 | 35 | |
36 | - /** |
|
37 | - * Indicates that the method is public. |
|
38 | - */ |
|
39 | - public const IS_PUBLIC = 1; |
|
36 | + /** |
|
37 | + * Indicates that the method is public. |
|
38 | + */ |
|
39 | + public const IS_PUBLIC = 1; |
|
40 | 40 | |
41 | - /** |
|
42 | - * Indicates that the method is protected. |
|
43 | - */ |
|
44 | - public const IS_PROTECTED = 2; |
|
41 | + /** |
|
42 | + * Indicates that the method is protected. |
|
43 | + */ |
|
44 | + public const IS_PROTECTED = 2; |
|
45 | 45 | |
46 | - /** |
|
47 | - * Indicates that the method is private. |
|
48 | - */ |
|
49 | - public const IS_PRIVATE = 4; |
|
46 | + /** |
|
47 | + * Indicates that the method is private. |
|
48 | + */ |
|
49 | + public const IS_PRIVATE = 4; |
|
50 | 50 | |
51 | - /** |
|
52 | - * Indicates that the method is abstract. |
|
53 | - */ |
|
54 | - public const IS_ABSTRACT = 64; |
|
51 | + /** |
|
52 | + * Indicates that the method is abstract. |
|
53 | + */ |
|
54 | + public const IS_ABSTRACT = 64; |
|
55 | 55 | |
56 | - /** |
|
57 | - * Indicates that the method is final. |
|
58 | - */ |
|
59 | - public const IS_FINAL = 32; |
|
56 | + /** |
|
57 | + * Indicates that the method is final. |
|
58 | + */ |
|
59 | + public const IS_FINAL = 32; |
|
60 | 60 | |
61 | - /** |
|
62 | - * Constructs a ReflectionMethod |
|
63 | - * |
|
64 | - * <code> |
|
65 | - * $reflection = new ReflectionMethod(new Example(), 'method'); |
|
66 | - * $reflection = new ReflectionMethod(Example::class, 'method'); |
|
67 | - * $reflection = new ReflectionMethod('Example::method'); |
|
68 | - * </code> |
|
69 | - * |
|
70 | - * @link https://php.net/manual/en/reflectionmethod.construct.php |
|
71 | - * @param string|object $objectOrMethod Classname, object |
|
72 | - * (instance of the class) that contains the method or class name and |
|
73 | - * method name delimited by ::. |
|
74 | - * @param string|null $method Name of the method if the first argument is a |
|
75 | - * classname or an object. |
|
76 | - * @throws ReflectionException if the class or method does not exist. |
|
77 | - */ |
|
78 | - public function __construct( |
|
79 | - #[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $objectOrMethod, |
|
80 | - #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $method = null |
|
81 | - ) {} |
|
61 | + /** |
|
62 | + * Constructs a ReflectionMethod |
|
63 | + * |
|
64 | + * <code> |
|
65 | + * $reflection = new ReflectionMethod(new Example(), 'method'); |
|
66 | + * $reflection = new ReflectionMethod(Example::class, 'method'); |
|
67 | + * $reflection = new ReflectionMethod('Example::method'); |
|
68 | + * </code> |
|
69 | + * |
|
70 | + * @link https://php.net/manual/en/reflectionmethod.construct.php |
|
71 | + * @param string|object $objectOrMethod Classname, object |
|
72 | + * (instance of the class) that contains the method or class name and |
|
73 | + * method name delimited by ::. |
|
74 | + * @param string|null $method Name of the method if the first argument is a |
|
75 | + * classname or an object. |
|
76 | + * @throws ReflectionException if the class or method does not exist. |
|
77 | + */ |
|
78 | + public function __construct( |
|
79 | + #[LanguageLevelTypeAware(['8.0' => 'object|string'], default: '')] $objectOrMethod, |
|
80 | + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $method = null |
|
81 | + ) {} |
|
82 | 82 | |
83 | - /** |
|
84 | - * Export a reflection method. |
|
85 | - * |
|
86 | - * @link https://php.net/manual/en/reflectionmethod.export.php |
|
87 | - * @param string $class The class name. |
|
88 | - * @param string $name The name of the method. |
|
89 | - * @param bool $return Setting to {@see true} will return the export, |
|
90 | - * as opposed to emitting it. Setting to {@see false} (the default) will do the |
|
91 | - * opposite. |
|
92 | - * @return string|null If the $return parameter is set to {@see true}, then |
|
93 | - * the export is returned as a string, otherwise {@see null} is returned. |
|
94 | - * @removed 8.0 |
|
95 | - */ |
|
96 | - #[Deprecated(since: '7.4')] |
|
97 | - public static function export($class, $name, $return = false) {} |
|
83 | + /** |
|
84 | + * Export a reflection method. |
|
85 | + * |
|
86 | + * @link https://php.net/manual/en/reflectionmethod.export.php |
|
87 | + * @param string $class The class name. |
|
88 | + * @param string $name The name of the method. |
|
89 | + * @param bool $return Setting to {@see true} will return the export, |
|
90 | + * as opposed to emitting it. Setting to {@see false} (the default) will do the |
|
91 | + * opposite. |
|
92 | + * @return string|null If the $return parameter is set to {@see true}, then |
|
93 | + * the export is returned as a string, otherwise {@see null} is returned. |
|
94 | + * @removed 8.0 |
|
95 | + */ |
|
96 | + #[Deprecated(since: '7.4')] |
|
97 | + public static function export($class, $name, $return = false) {} |
|
98 | 98 | |
99 | - /** |
|
100 | - * Returns the string representation of the ReflectionMethod object. |
|
101 | - * |
|
102 | - * @link https://php.net/manual/en/reflectionmethod.tostring.php |
|
103 | - * @return string A string representation of this {@see ReflectionMethod} instance. |
|
104 | - */ |
|
105 | - #[TentativeType] |
|
106 | - public function __toString(): string {} |
|
99 | + /** |
|
100 | + * Returns the string representation of the ReflectionMethod object. |
|
101 | + * |
|
102 | + * @link https://php.net/manual/en/reflectionmethod.tostring.php |
|
103 | + * @return string A string representation of this {@see ReflectionMethod} instance. |
|
104 | + */ |
|
105 | + #[TentativeType] |
|
106 | + public function __toString(): string {} |
|
107 | 107 | |
108 | - /** |
|
109 | - * Checks if method is public |
|
110 | - * |
|
111 | - * @link https://php.net/manual/en/reflectionmethod.ispublic.php |
|
112 | - * @return bool Returns {@see true} if the method is public, otherwise {@see false} |
|
113 | - */ |
|
114 | - #[Pure] |
|
115 | - #[TentativeType] |
|
116 | - public function isPublic(): bool {} |
|
108 | + /** |
|
109 | + * Checks if method is public |
|
110 | + * |
|
111 | + * @link https://php.net/manual/en/reflectionmethod.ispublic.php |
|
112 | + * @return bool Returns {@see true} if the method is public, otherwise {@see false} |
|
113 | + */ |
|
114 | + #[Pure] |
|
115 | + #[TentativeType] |
|
116 | + public function isPublic(): bool {} |
|
117 | 117 | |
118 | - /** |
|
119 | - * Checks if method is private |
|
120 | - * |
|
121 | - * @link https://php.net/manual/en/reflectionmethod.isprivate.php |
|
122 | - * @return bool Returns {@see true} if the method is private, otherwise {@see false} |
|
123 | - */ |
|
124 | - #[Pure] |
|
125 | - #[TentativeType] |
|
126 | - public function isPrivate(): bool {} |
|
118 | + /** |
|
119 | + * Checks if method is private |
|
120 | + * |
|
121 | + * @link https://php.net/manual/en/reflectionmethod.isprivate.php |
|
122 | + * @return bool Returns {@see true} if the method is private, otherwise {@see false} |
|
123 | + */ |
|
124 | + #[Pure] |
|
125 | + #[TentativeType] |
|
126 | + public function isPrivate(): bool {} |
|
127 | 127 | |
128 | - /** |
|
129 | - * Checks if method is protected |
|
130 | - * |
|
131 | - * @link https://php.net/manual/en/reflectionmethod.isprotected.php |
|
132 | - * @return bool Returns {@see true} if the method is protected, otherwise {@see false} |
|
133 | - */ |
|
134 | - #[Pure] |
|
135 | - #[TentativeType] |
|
136 | - public function isProtected(): bool {} |
|
128 | + /** |
|
129 | + * Checks if method is protected |
|
130 | + * |
|
131 | + * @link https://php.net/manual/en/reflectionmethod.isprotected.php |
|
132 | + * @return bool Returns {@see true} if the method is protected, otherwise {@see false} |
|
133 | + */ |
|
134 | + #[Pure] |
|
135 | + #[TentativeType] |
|
136 | + public function isProtected(): bool {} |
|
137 | 137 | |
138 | - /** |
|
139 | - * Checks if method is abstract |
|
140 | - * |
|
141 | - * @link https://php.net/manual/en/reflectionmethod.isabstract.php |
|
142 | - * @return bool Returns {@see true} if the method is abstract, otherwise {@see false} |
|
143 | - */ |
|
144 | - #[Pure] |
|
145 | - #[TentativeType] |
|
146 | - public function isAbstract(): bool {} |
|
138 | + /** |
|
139 | + * Checks if method is abstract |
|
140 | + * |
|
141 | + * @link https://php.net/manual/en/reflectionmethod.isabstract.php |
|
142 | + * @return bool Returns {@see true} if the method is abstract, otherwise {@see false} |
|
143 | + */ |
|
144 | + #[Pure] |
|
145 | + #[TentativeType] |
|
146 | + public function isAbstract(): bool {} |
|
147 | 147 | |
148 | - /** |
|
149 | - * Checks if method is final |
|
150 | - * |
|
151 | - * @link https://php.net/manual/en/reflectionmethod.isfinal.php |
|
152 | - * @return bool Returns {@see true} if the method is final, otherwise {@see false} |
|
153 | - */ |
|
154 | - #[Pure] |
|
155 | - #[TentativeType] |
|
156 | - public function isFinal(): bool {} |
|
148 | + /** |
|
149 | + * Checks if method is final |
|
150 | + * |
|
151 | + * @link https://php.net/manual/en/reflectionmethod.isfinal.php |
|
152 | + * @return bool Returns {@see true} if the method is final, otherwise {@see false} |
|
153 | + */ |
|
154 | + #[Pure] |
|
155 | + #[TentativeType] |
|
156 | + public function isFinal(): bool {} |
|
157 | 157 | |
158 | - /** |
|
159 | - * Checks if method is static |
|
160 | - * |
|
161 | - * @link https://php.net/manual/en/reflectionmethod.isstatic.php |
|
162 | - * @return bool Returns {@see true} if the method is static, otherwise {@see false} |
|
163 | - */ |
|
164 | - #[Pure] |
|
165 | - #[TentativeType] |
|
166 | - public function isStatic(): bool {} |
|
158 | + /** |
|
159 | + * Checks if method is static |
|
160 | + * |
|
161 | + * @link https://php.net/manual/en/reflectionmethod.isstatic.php |
|
162 | + * @return bool Returns {@see true} if the method is static, otherwise {@see false} |
|
163 | + */ |
|
164 | + #[Pure] |
|
165 | + #[TentativeType] |
|
166 | + public function isStatic(): bool {} |
|
167 | 167 | |
168 | - /** |
|
169 | - * Checks if method is a constructor |
|
170 | - * |
|
171 | - * @link https://php.net/manual/en/reflectionmethod.isconstructor.php |
|
172 | - * @return bool Returns {@see true} if the method is a constructor, otherwise {@see false} |
|
173 | - */ |
|
174 | - #[Pure] |
|
175 | - #[TentativeType] |
|
176 | - public function isConstructor(): bool {} |
|
168 | + /** |
|
169 | + * Checks if method is a constructor |
|
170 | + * |
|
171 | + * @link https://php.net/manual/en/reflectionmethod.isconstructor.php |
|
172 | + * @return bool Returns {@see true} if the method is a constructor, otherwise {@see false} |
|
173 | + */ |
|
174 | + #[Pure] |
|
175 | + #[TentativeType] |
|
176 | + public function isConstructor(): bool {} |
|
177 | 177 | |
178 | - /** |
|
179 | - * Checks if method is a destructor |
|
180 | - * |
|
181 | - * @link https://php.net/manual/en/reflectionmethod.isdestructor.php |
|
182 | - * @return bool Returns {@see true} if the method is a destructor, otherwise {@see false} |
|
183 | - */ |
|
184 | - #[Pure] |
|
185 | - #[TentativeType] |
|
186 | - public function isDestructor(): bool {} |
|
178 | + /** |
|
179 | + * Checks if method is a destructor |
|
180 | + * |
|
181 | + * @link https://php.net/manual/en/reflectionmethod.isdestructor.php |
|
182 | + * @return bool Returns {@see true} if the method is a destructor, otherwise {@see false} |
|
183 | + */ |
|
184 | + #[Pure] |
|
185 | + #[TentativeType] |
|
186 | + public function isDestructor(): bool {} |
|
187 | 187 | |
188 | - /** |
|
189 | - * Returns a dynamically created closure for the method |
|
190 | - * |
|
191 | - * @link https://php.net/manual/en/reflectionmethod.getclosure.php |
|
192 | - * @param object $object Forbidden for static methods, required for other methods or nothing. |
|
193 | - * @return Closure Retruns {@see Closure} or {@see null} in case of an error. |
|
194 | - * @since 5.4 |
|
195 | - */ |
|
196 | - #[Pure] |
|
197 | - #[TentativeType] |
|
198 | - public function getClosure(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object = null): Closure {} |
|
188 | + /** |
|
189 | + * Returns a dynamically created closure for the method |
|
190 | + * |
|
191 | + * @link https://php.net/manual/en/reflectionmethod.getclosure.php |
|
192 | + * @param object $object Forbidden for static methods, required for other methods or nothing. |
|
193 | + * @return Closure Retruns {@see Closure} or {@see null} in case of an error. |
|
194 | + * @since 5.4 |
|
195 | + */ |
|
196 | + #[Pure] |
|
197 | + #[TentativeType] |
|
198 | + public function getClosure(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object = null): Closure {} |
|
199 | 199 | |
200 | - /** |
|
201 | - * Gets the method modifiers |
|
202 | - * |
|
203 | - * @link https://php.net/manual/en/reflectionmethod.getmodifiers.php |
|
204 | - * @return int A numeric representation of the modifiers. The modifiers are |
|
205 | - * listed below. The actual meanings of these modifiers are described in the |
|
206 | - * predefined constants. |
|
207 | - * |
|
208 | - * ReflectionMethod modifiers: |
|
209 | - * |
|
210 | - * - {@see ReflectionMethod::IS_STATIC} - Indicates that the method is static. |
|
211 | - * - {@see ReflectionMethod::IS_PUBLIC} - Indicates that the method is public. |
|
212 | - * - {@see ReflectionMethod::IS_PROTECTED} - Indicates that the method is protected. |
|
213 | - * - {@see ReflectionMethod::IS_PRIVATE} - Indicates that the method is private. |
|
214 | - * - {@see ReflectionMethod::IS_ABSTRACT} - Indicates that the method is abstract. |
|
215 | - * - {@see ReflectionMethod::IS_FINAL} - Indicates that the method is final. |
|
216 | - */ |
|
217 | - #[Pure] |
|
218 | - #[TentativeType] |
|
219 | - public function getModifiers(): int {} |
|
200 | + /** |
|
201 | + * Gets the method modifiers |
|
202 | + * |
|
203 | + * @link https://php.net/manual/en/reflectionmethod.getmodifiers.php |
|
204 | + * @return int A numeric representation of the modifiers. The modifiers are |
|
205 | + * listed below. The actual meanings of these modifiers are described in the |
|
206 | + * predefined constants. |
|
207 | + * |
|
208 | + * ReflectionMethod modifiers: |
|
209 | + * |
|
210 | + * - {@see ReflectionMethod::IS_STATIC} - Indicates that the method is static. |
|
211 | + * - {@see ReflectionMethod::IS_PUBLIC} - Indicates that the method is public. |
|
212 | + * - {@see ReflectionMethod::IS_PROTECTED} - Indicates that the method is protected. |
|
213 | + * - {@see ReflectionMethod::IS_PRIVATE} - Indicates that the method is private. |
|
214 | + * - {@see ReflectionMethod::IS_ABSTRACT} - Indicates that the method is abstract. |
|
215 | + * - {@see ReflectionMethod::IS_FINAL} - Indicates that the method is final. |
|
216 | + */ |
|
217 | + #[Pure] |
|
218 | + #[TentativeType] |
|
219 | + public function getModifiers(): int {} |
|
220 | 220 | |
221 | - /** |
|
222 | - * Invokes a reflected method. |
|
223 | - * |
|
224 | - * @link https://php.net/manual/en/reflectionmethod.invoke.php |
|
225 | - * @param object|null $object The object to invoke the method on. For static |
|
226 | - * methods, pass {@see null} to this parameter. |
|
227 | - * @param mixed ...$args Zero or more parameters to be passed to the |
|
228 | - * method. It accepts a variable number of parameters which are passed to |
|
229 | - * the method. |
|
230 | - * @return mixed Returns the method result. |
|
231 | - * @throws ReflectionException if the object parameter does not contain an |
|
232 | - * instance of the class that this method was declared in or the method |
|
233 | - * invocation failed. |
|
234 | - */ |
|
235 | - public function invoke($object, ...$args) {} |
|
221 | + /** |
|
222 | + * Invokes a reflected method. |
|
223 | + * |
|
224 | + * @link https://php.net/manual/en/reflectionmethod.invoke.php |
|
225 | + * @param object|null $object The object to invoke the method on. For static |
|
226 | + * methods, pass {@see null} to this parameter. |
|
227 | + * @param mixed ...$args Zero or more parameters to be passed to the |
|
228 | + * method. It accepts a variable number of parameters which are passed to |
|
229 | + * the method. |
|
230 | + * @return mixed Returns the method result. |
|
231 | + * @throws ReflectionException if the object parameter does not contain an |
|
232 | + * instance of the class that this method was declared in or the method |
|
233 | + * invocation failed. |
|
234 | + */ |
|
235 | + public function invoke($object, ...$args) {} |
|
236 | 236 | |
237 | - /** |
|
238 | - * Invokes the reflected method and pass its arguments as array. |
|
239 | - * |
|
240 | - * @link https://php.net/manual/en/reflectionmethod.invokeargs.php |
|
241 | - * @param object|null $object The object to invoke the method on. In case |
|
242 | - * of static methods, you can pass {@see null} to this parameter. |
|
243 | - * @param array $args The parameters to be passed to the function, as an {@see array}. |
|
244 | - * @return mixed the method result. |
|
245 | - * @throws ReflectionException if the object parameter does not contain an |
|
246 | - * instance of the class that this method was declared in or the method |
|
247 | - * invocation failed. |
|
248 | - */ |
|
249 | - #[TentativeType] |
|
250 | - public function invokeArgs(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object, array $args): mixed {} |
|
237 | + /** |
|
238 | + * Invokes the reflected method and pass its arguments as array. |
|
239 | + * |
|
240 | + * @link https://php.net/manual/en/reflectionmethod.invokeargs.php |
|
241 | + * @param object|null $object The object to invoke the method on. In case |
|
242 | + * of static methods, you can pass {@see null} to this parameter. |
|
243 | + * @param array $args The parameters to be passed to the function, as an {@see array}. |
|
244 | + * @return mixed the method result. |
|
245 | + * @throws ReflectionException if the object parameter does not contain an |
|
246 | + * instance of the class that this method was declared in or the method |
|
247 | + * invocation failed. |
|
248 | + */ |
|
249 | + #[TentativeType] |
|
250 | + public function invokeArgs(#[LanguageLevelTypeAware(['8.0' => 'object|null'], default: '')] $object, array $args): mixed {} |
|
251 | 251 | |
252 | - /** |
|
253 | - * Gets declaring class for the reflected method. |
|
254 | - * |
|
255 | - * @link https://php.net/manual/en/reflectionmethod.getdeclaringclass.php |
|
256 | - * @return ReflectionClass A {@see ReflectionClass} object of the class that the |
|
257 | - * reflected method is part of. |
|
258 | - */ |
|
259 | - #[Pure] |
|
260 | - #[TentativeType] |
|
261 | - public function getDeclaringClass(): ReflectionClass {} |
|
252 | + /** |
|
253 | + * Gets declaring class for the reflected method. |
|
254 | + * |
|
255 | + * @link https://php.net/manual/en/reflectionmethod.getdeclaringclass.php |
|
256 | + * @return ReflectionClass A {@see ReflectionClass} object of the class that the |
|
257 | + * reflected method is part of. |
|
258 | + */ |
|
259 | + #[Pure] |
|
260 | + #[TentativeType] |
|
261 | + public function getDeclaringClass(): ReflectionClass {} |
|
262 | 262 | |
263 | - /** |
|
264 | - * Gets the method prototype (if there is one). |
|
265 | - * |
|
266 | - * @link https://php.net/manual/en/reflectionmethod.getprototype.php |
|
267 | - * @return ReflectionMethod A {@see ReflectionMethod} instance of the method prototype. |
|
268 | - * @throws ReflectionException if the method does not have a prototype |
|
269 | - */ |
|
270 | - #[Pure] |
|
271 | - #[TentativeType] |
|
272 | - public function getPrototype(): ReflectionMethod {} |
|
263 | + /** |
|
264 | + * Gets the method prototype (if there is one). |
|
265 | + * |
|
266 | + * @link https://php.net/manual/en/reflectionmethod.getprototype.php |
|
267 | + * @return ReflectionMethod A {@see ReflectionMethod} instance of the method prototype. |
|
268 | + * @throws ReflectionException if the method does not have a prototype |
|
269 | + */ |
|
270 | + #[Pure] |
|
271 | + #[TentativeType] |
|
272 | + public function getPrototype(): ReflectionMethod {} |
|
273 | 273 | |
274 | - /** |
|
275 | - * Set method accessibility |
|
276 | - * |
|
277 | - * @link https://php.net/manual/en/reflectionmethod.setaccessible.php |
|
278 | - * @param bool $accessible {@see true} to allow accessibility, or {@see false} |
|
279 | - * @return void No value is returned. |
|
280 | - * @since 5.3.2 |
|
281 | - */ |
|
282 | - #[PhpStormStubsElementAvailable(to: "8.0")] |
|
283 | - #[TentativeType] |
|
284 | - public function setAccessible(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $accessible): void {} |
|
274 | + /** |
|
275 | + * Set method accessibility |
|
276 | + * |
|
277 | + * @link https://php.net/manual/en/reflectionmethod.setaccessible.php |
|
278 | + * @param bool $accessible {@see true} to allow accessibility, or {@see false} |
|
279 | + * @return void No value is returned. |
|
280 | + * @since 5.3.2 |
|
281 | + */ |
|
282 | + #[PhpStormStubsElementAvailable(to: "8.0")] |
|
283 | + #[TentativeType] |
|
284 | + public function setAccessible(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $accessible): void {} |
|
285 | 285 | |
286 | - /** |
|
287 | - * Set method accessibility |
|
288 | - * This method is no-op starting from PHP 8.1 |
|
289 | - * |
|
290 | - * @link https://php.net/manual/en/reflectionmethod.setaccessible.php |
|
291 | - * @param bool $accessible {@see true} to allow accessibility, or {@see false} |
|
292 | - * @return void No value is returned. |
|
293 | - */ |
|
294 | - #[Pure] |
|
295 | - #[PhpStormStubsElementAvailable(from: "8.1")] |
|
296 | - #[TentativeType] |
|
297 | - public function setAccessible(bool $accessible): void {} |
|
286 | + /** |
|
287 | + * Set method accessibility |
|
288 | + * This method is no-op starting from PHP 8.1 |
|
289 | + * |
|
290 | + * @link https://php.net/manual/en/reflectionmethod.setaccessible.php |
|
291 | + * @param bool $accessible {@see true} to allow accessibility, or {@see false} |
|
292 | + * @return void No value is returned. |
|
293 | + */ |
|
294 | + #[Pure] |
|
295 | + #[PhpStormStubsElementAvailable(from: "8.1")] |
|
296 | + #[TentativeType] |
|
297 | + public function setAccessible(bool $accessible): void {} |
|
298 | 298 | } |
@@ -13,8 +13,7 @@ |
||
13 | 13 | * |
14 | 14 | * @link https://php.net/manual/en/class.reflectionmethod.php |
15 | 15 | */ |
16 | -class ReflectionMethod extends ReflectionFunctionAbstract |
|
17 | -{ |
|
16 | +class ReflectionMethod extends ReflectionFunctionAbstract { |
|
18 | 17 | /** |
19 | 18 | * @var string Name of the method, same as calling the {@see ReflectionMethod::getName()} method |
20 | 19 | */ |
@@ -7,75 +7,75 @@ |
||
7 | 7 | */ |
8 | 8 | class ReflectionAttribute implements Reflector |
9 | 9 | { |
10 | - /** |
|
11 | - * Indicates that the search for a suitable attribute should not be by |
|
12 | - * strict comparison, but by the inheritance chain. |
|
13 | - * |
|
14 | - * Used for the argument of flags of the "getAttribute" method. |
|
15 | - * |
|
16 | - * @since 8.0 |
|
17 | - */ |
|
18 | - public const IS_INSTANCEOF = 2; |
|
10 | + /** |
|
11 | + * Indicates that the search for a suitable attribute should not be by |
|
12 | + * strict comparison, but by the inheritance chain. |
|
13 | + * |
|
14 | + * Used for the argument of flags of the "getAttribute" method. |
|
15 | + * |
|
16 | + * @since 8.0 |
|
17 | + */ |
|
18 | + public const IS_INSTANCEOF = 2; |
|
19 | 19 | |
20 | - /** |
|
21 | - * ReflectionAttribute cannot be created explicitly. |
|
22 | - * @since 8.0 |
|
23 | - */ |
|
24 | - private function __construct() {} |
|
20 | + /** |
|
21 | + * ReflectionAttribute cannot be created explicitly. |
|
22 | + * @since 8.0 |
|
23 | + */ |
|
24 | + private function __construct() {} |
|
25 | 25 | |
26 | - /** |
|
27 | - * Gets attribute name |
|
28 | - * |
|
29 | - * @return string The name of the attribute parameter. |
|
30 | - * @since 8.0 |
|
31 | - */ |
|
32 | - #[Pure] |
|
33 | - public function getName(): string {} |
|
26 | + /** |
|
27 | + * Gets attribute name |
|
28 | + * |
|
29 | + * @return string The name of the attribute parameter. |
|
30 | + * @since 8.0 |
|
31 | + */ |
|
32 | + #[Pure] |
|
33 | + public function getName(): string {} |
|
34 | 34 | |
35 | - /** |
|
36 | - * Returns the target of the attribute as a bit mask format. |
|
37 | - * |
|
38 | - * @return int |
|
39 | - * @since 8.0 |
|
40 | - */ |
|
41 | - #[Pure] |
|
42 | - public function getTarget(): int {} |
|
35 | + /** |
|
36 | + * Returns the target of the attribute as a bit mask format. |
|
37 | + * |
|
38 | + * @return int |
|
39 | + * @since 8.0 |
|
40 | + */ |
|
41 | + #[Pure] |
|
42 | + public function getTarget(): int {} |
|
43 | 43 | |
44 | - /** |
|
45 | - * Returns {@see true} if the attribute is repeated. |
|
46 | - * |
|
47 | - * @return bool |
|
48 | - * @since 8.0 |
|
49 | - */ |
|
50 | - #[Pure] |
|
51 | - public function isRepeated(): bool {} |
|
44 | + /** |
|
45 | + * Returns {@see true} if the attribute is repeated. |
|
46 | + * |
|
47 | + * @return bool |
|
48 | + * @since 8.0 |
|
49 | + */ |
|
50 | + #[Pure] |
|
51 | + public function isRepeated(): bool {} |
|
52 | 52 | |
53 | - /** |
|
54 | - * Gets list of passed attribute's arguments. |
|
55 | - * |
|
56 | - * @return array |
|
57 | - * @since 8.0 |
|
58 | - */ |
|
59 | - #[Pure] |
|
60 | - public function getArguments(): array {} |
|
53 | + /** |
|
54 | + * Gets list of passed attribute's arguments. |
|
55 | + * |
|
56 | + * @return array |
|
57 | + * @since 8.0 |
|
58 | + */ |
|
59 | + #[Pure] |
|
60 | + public function getArguments(): array {} |
|
61 | 61 | |
62 | - /** |
|
63 | - * Creates a new instance of the attribute with passed arguments |
|
64 | - * |
|
65 | - * @return object |
|
66 | - * @since 8.0 |
|
67 | - */ |
|
68 | - public function newInstance(): object {} |
|
62 | + /** |
|
63 | + * Creates a new instance of the attribute with passed arguments |
|
64 | + * |
|
65 | + * @return object |
|
66 | + * @since 8.0 |
|
67 | + */ |
|
68 | + public function newInstance(): object {} |
|
69 | 69 | |
70 | - /** |
|
71 | - * ReflectionAttribute cannot be cloned |
|
72 | - * |
|
73 | - * @return void |
|
74 | - * @since 8.0 |
|
75 | - */ |
|
76 | - private function __clone(): void {} |
|
70 | + /** |
|
71 | + * ReflectionAttribute cannot be cloned |
|
72 | + * |
|
73 | + * @return void |
|
74 | + * @since 8.0 |
|
75 | + */ |
|
76 | + private function __clone(): void {} |
|
77 | 77 | |
78 | - public function __toString(): string {} |
|
78 | + public function __toString(): string {} |
|
79 | 79 | |
80 | - public static function export() {} |
|
80 | + public static function export() {} |
|
81 | 81 | } |
@@ -5,8 +5,7 @@ |
||
5 | 5 | /** |
6 | 6 | * @since 8.0 |
7 | 7 | */ |
8 | -class ReflectionAttribute implements Reflector |
|
9 | -{ |
|
8 | +class ReflectionAttribute implements Reflector { |
|
10 | 9 | /** |
11 | 10 | * Indicates that the search for a suitable attribute should not be by |
12 | 11 | * strict comparison, but by the inheritance chain. |
@@ -15,198 +15,198 @@ |
||
15 | 15 | */ |
16 | 16 | class ReflectionClassConstant implements Reflector |
17 | 17 | { |
18 | - /** |
|
19 | - * @var string Constant name, same as calling the {@see ReflectionClassConstant::getName()} method |
|
20 | - */ |
|
21 | - #[Immutable] |
|
22 | - #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] |
|
23 | - public $name; |
|
24 | - |
|
25 | - /** |
|
26 | - * @var string Fully qualified class name where this constant was defined |
|
27 | - */ |
|
28 | - #[Immutable] |
|
29 | - #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] |
|
30 | - public $class; |
|
31 | - |
|
32 | - /** |
|
33 | - * @var bool |
|
34 | - * @since 8.1 |
|
35 | - */ |
|
36 | - #[Immutable] |
|
37 | - public bool $isFinal; |
|
38 | - |
|
39 | - /** |
|
40 | - * Indicates that the constant is public. |
|
41 | - * |
|
42 | - * @since 8.0 |
|
43 | - */ |
|
44 | - public const IS_PUBLIC = 1; |
|
45 | - |
|
46 | - /** |
|
47 | - * Indicates that the constant is protected. |
|
48 | - * |
|
49 | - * @since 8.0 |
|
50 | - */ |
|
51 | - public const IS_PROTECTED = 2; |
|
52 | - |
|
53 | - /** |
|
54 | - * Indicates that the constant is private. |
|
55 | - * |
|
56 | - * @since 8.0 |
|
57 | - */ |
|
58 | - public const IS_PRIVATE = 4; |
|
59 | - |
|
60 | - /** |
|
61 | - * @since 8.1 |
|
62 | - */ |
|
63 | - public const IS_FINAL = 5; |
|
64 | - |
|
65 | - /** |
|
66 | - * ReflectionClassConstant constructor. |
|
67 | - * |
|
68 | - * @param string|object $class Either a string containing the name of the class to reflect, or an object. |
|
69 | - * @param string $constant The name of the class constant. |
|
70 | - * @since 7.1 |
|
71 | - * @link https://php.net/manual/en/reflectionclassconstant.construct.php |
|
72 | - */ |
|
73 | - public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string|object'], default: '')] $class, string $constant) {} |
|
74 | - |
|
75 | - /** |
|
76 | - * @link https://php.net/manual/en/reflectionclassconstant.export.php |
|
77 | - * @param string|object $class The reflection to export. |
|
78 | - * @param string $name The class constant name. |
|
79 | - * @param bool $return Setting to {@see true} will return the export, as opposed to emitting it. Setting |
|
80 | - * to {@see false} (the default) will do the opposite. |
|
81 | - * @return string|null |
|
82 | - * @since 7.1 |
|
83 | - * @removed 8.0 |
|
84 | - */ |
|
85 | - #[Deprecated(since: '7.4')] |
|
86 | - public static function export($class, $name, $return = false) {} |
|
87 | - |
|
88 | - /** |
|
89 | - * Gets declaring class |
|
90 | - * |
|
91 | - * @return ReflectionClass |
|
92 | - * @link https://php.net/manual/en/reflectionclassconstant.getdeclaringclass.php |
|
93 | - * @since 7.1 |
|
94 | - */ |
|
95 | - #[Pure] |
|
96 | - #[TentativeType] |
|
97 | - public function getDeclaringClass(): ReflectionClass {} |
|
98 | - |
|
99 | - /** |
|
100 | - * Gets doc comments |
|
101 | - * |
|
102 | - * @return string|false The doc comment if it exists, otherwise {@see false} |
|
103 | - * @link https://php.net/manual/en/reflectionclassconstant.getdoccomment.php |
|
104 | - * @since 7.1 |
|
105 | - */ |
|
106 | - #[Pure] |
|
107 | - #[TentativeType] |
|
108 | - public function getDocComment(): string|false {} |
|
109 | - |
|
110 | - /** |
|
111 | - * Gets the class constant modifiers |
|
112 | - * |
|
113 | - * @return int A numeric representation of the modifiers. The actual meanings of these modifiers are described in |
|
114 | - * the predefined constants. |
|
115 | - * @link https://php.net/manual/en/reflectionclassconstant.getmodifiers.php |
|
116 | - * @since 7.1 |
|
117 | - */ |
|
118 | - #[Pure] |
|
119 | - #[TentativeType] |
|
120 | - public function getModifiers(): int {} |
|
121 | - |
|
122 | - /** |
|
123 | - * Get name of the constant |
|
124 | - * |
|
125 | - * @link https://php.net/manual/en/reflectionclassconstant.getname.php |
|
126 | - * @return string Returns the constant's name. |
|
127 | - * @since 7.1 |
|
128 | - */ |
|
129 | - #[Pure] |
|
130 | - #[TentativeType] |
|
131 | - public function getName(): string {} |
|
132 | - |
|
133 | - /** |
|
134 | - * Gets value |
|
135 | - * |
|
136 | - * @link https://php.net/manual/en/reflectionclassconstant.getvalue.php |
|
137 | - * @return mixed The value of the class constant. |
|
138 | - * @since 7.1 |
|
139 | - */ |
|
140 | - #[Pure] |
|
141 | - #[TentativeType] |
|
142 | - public function getValue(): mixed {} |
|
143 | - |
|
144 | - /** |
|
145 | - * Checks if class constant is private |
|
146 | - * |
|
147 | - * @link https://php.net/manual/en/reflectionclassconstant.isprivate.php |
|
148 | - * @return bool |
|
149 | - * @since 7.1 |
|
150 | - */ |
|
151 | - #[Pure] |
|
152 | - #[TentativeType] |
|
153 | - public function isPrivate(): bool {} |
|
154 | - |
|
155 | - /** |
|
156 | - * Checks if class constant is protected |
|
157 | - * |
|
158 | - * @link https://php.net/manual/en/reflectionclassconstant.isprotected.php |
|
159 | - * @return bool |
|
160 | - * @since 7.1 |
|
161 | - */ |
|
162 | - #[Pure] |
|
163 | - #[TentativeType] |
|
164 | - public function isProtected(): bool {} |
|
165 | - |
|
166 | - /** |
|
167 | - * Checks if class constant is public |
|
168 | - * |
|
169 | - * @link https://php.net/manual/en/reflectionclassconstant.ispublic.php |
|
170 | - * @return bool |
|
171 | - * @since 7.1 |
|
172 | - */ |
|
173 | - #[Pure] |
|
174 | - #[TentativeType] |
|
175 | - public function isPublic(): bool {} |
|
176 | - |
|
177 | - /** |
|
178 | - * Returns the string representation of the ReflectionClassConstant object. |
|
179 | - * |
|
180 | - * @link https://php.net/manual/en/reflectionclassconstant.tostring.php |
|
181 | - * @return string |
|
182 | - * @since 7.1 |
|
183 | - */ |
|
184 | - public function __toString(): string {} |
|
185 | - |
|
186 | - /** |
|
187 | - * Returns an array of constant attributes. |
|
188 | - * |
|
189 | - * @param string|null $name Name of an attribute class |
|
190 | - * @param int $flags Сriteria by which the attribute is searched. |
|
191 | - * @return ReflectionAttribute[] |
|
192 | - * @since 8.0 |
|
193 | - */ |
|
194 | - #[Pure] |
|
195 | - public function getAttributes(?string $name = null, int $flags = 0): array {} |
|
196 | - |
|
197 | - /** |
|
198 | - * ReflectionClassConstant cannot be cloned |
|
199 | - * |
|
200 | - * @return void |
|
201 | - */ |
|
202 | - final private function __clone(): void {} |
|
203 | - |
|
204 | - #[PhpStormStubsElementAvailable('8.1')] |
|
205 | - public function isEnumCase(): bool {} |
|
206 | - |
|
207 | - /** |
|
208 | - * @return bool |
|
209 | - * @since 8.1 |
|
210 | - */ |
|
211 | - public function isFinal(): bool {} |
|
18 | + /** |
|
19 | + * @var string Constant name, same as calling the {@see ReflectionClassConstant::getName()} method |
|
20 | + */ |
|
21 | + #[Immutable] |
|
22 | + #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] |
|
23 | + public $name; |
|
24 | + |
|
25 | + /** |
|
26 | + * @var string Fully qualified class name where this constant was defined |
|
27 | + */ |
|
28 | + #[Immutable] |
|
29 | + #[LanguageLevelTypeAware(['8.1' => 'string'], default: '')] |
|
30 | + public $class; |
|
31 | + |
|
32 | + /** |
|
33 | + * @var bool |
|
34 | + * @since 8.1 |
|
35 | + */ |
|
36 | + #[Immutable] |
|
37 | + public bool $isFinal; |
|
38 | + |
|
39 | + /** |
|
40 | + * Indicates that the constant is public. |
|
41 | + * |
|
42 | + * @since 8.0 |
|
43 | + */ |
|
44 | + public const IS_PUBLIC = 1; |
|
45 | + |
|
46 | + /** |
|
47 | + * Indicates that the constant is protected. |
|
48 | + * |
|
49 | + * @since 8.0 |
|
50 | + */ |
|
51 | + public const IS_PROTECTED = 2; |
|
52 | + |
|
53 | + /** |
|
54 | + * Indicates that the constant is private. |
|
55 | + * |
|
56 | + * @since 8.0 |
|
57 | + */ |
|
58 | + public const IS_PRIVATE = 4; |
|
59 | + |
|
60 | + /** |
|
61 | + * @since 8.1 |
|
62 | + */ |
|
63 | + public const IS_FINAL = 5; |
|
64 | + |
|
65 | + /** |
|
66 | + * ReflectionClassConstant constructor. |
|
67 | + * |
|
68 | + * @param string|object $class Either a string containing the name of the class to reflect, or an object. |
|
69 | + * @param string $constant The name of the class constant. |
|
70 | + * @since 7.1 |
|
71 | + * @link https://php.net/manual/en/reflectionclassconstant.construct.php |
|
72 | + */ |
|
73 | + public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string|object'], default: '')] $class, string $constant) {} |
|
74 | + |
|
75 | + /** |
|
76 | + * @link https://php.net/manual/en/reflectionclassconstant.export.php |
|
77 | + * @param string|object $class The reflection to export. |
|
78 | + * @param string $name The class constant name. |
|
79 | + * @param bool $return Setting to {@see true} will return the export, as opposed to emitting it. Setting |
|
80 | + * to {@see false} (the default) will do the opposite. |
|
81 | + * @return string|null |
|
82 | + * @since 7.1 |
|
83 | + * @removed 8.0 |
|
84 | + */ |
|
85 | + #[Deprecated(since: '7.4')] |
|
86 | + public static function export($class, $name, $return = false) {} |
|
87 | + |
|
88 | + /** |
|
89 | + * Gets declaring class |
|
90 | + * |
|
91 | + * @return ReflectionClass |
|
92 | + * @link https://php.net/manual/en/reflectionclassconstant.getdeclaringclass.php |
|
93 | + * @since 7.1 |
|
94 | + */ |
|
95 | + #[Pure] |
|
96 | + #[TentativeType] |
|
97 | + public function getDeclaringClass(): ReflectionClass {} |
|
98 | + |
|
99 | + /** |
|
100 | + * Gets doc comments |
|
101 | + * |
|
102 | + * @return string|false The doc comment if it exists, otherwise {@see false} |
|
103 | + * @link https://php.net/manual/en/reflectionclassconstant.getdoccomment.php |
|
104 | + * @since 7.1 |
|
105 | + */ |
|
106 | + #[Pure] |
|
107 | + #[TentativeType] |
|
108 | + public function getDocComment(): string|false {} |
|
109 | + |
|
110 | + /** |
|
111 | + * Gets the class constant modifiers |
|
112 | + * |
|
113 | + * @return int A numeric representation of the modifiers. The actual meanings of these modifiers are described in |
|
114 | + * the predefined constants. |
|
115 | + * @link https://php.net/manual/en/reflectionclassconstant.getmodifiers.php |
|
116 | + * @since 7.1 |
|
117 | + */ |
|
118 | + #[Pure] |
|
119 | + #[TentativeType] |
|
120 | + public function getModifiers(): int {} |
|
121 | + |
|
122 | + /** |
|
123 | + * Get name of the constant |
|
124 | + * |
|
125 | + * @link https://php.net/manual/en/reflectionclassconstant.getname.php |
|
126 | + * @return string Returns the constant's name. |
|
127 | + * @since 7.1 |
|
128 | + */ |
|
129 | + #[Pure] |
|
130 | + #[TentativeType] |
|
131 | + public function getName(): string {} |
|
132 | + |
|
133 | + /** |
|
134 | + * Gets value |
|
135 | + * |
|
136 | + * @link https://php.net/manual/en/reflectionclassconstant.getvalue.php |
|
137 | + * @return mixed The value of the class constant. |
|
138 | + * @since 7.1 |
|
139 | + */ |
|
140 | + #[Pure] |
|
141 | + #[TentativeType] |
|
142 | + public function getValue(): mixed {} |
|
143 | + |
|
144 | + /** |
|
145 | + * Checks if class constant is private |
|
146 | + * |
|
147 | + * @link https://php.net/manual/en/reflectionclassconstant.isprivate.php |
|
148 | + * @return bool |
|
149 | + * @since 7.1 |
|
150 | + */ |
|
151 | + #[Pure] |
|
152 | + #[TentativeType] |
|
153 | + public function isPrivate(): bool {} |
|
154 | + |
|
155 | + /** |
|
156 | + * Checks if class constant is protected |
|
157 | + * |
|
158 | + * @link https://php.net/manual/en/reflectionclassconstant.isprotected.php |
|
159 | + * @return bool |
|
160 | + * @since 7.1 |
|
161 | + */ |
|
162 | + #[Pure] |
|
163 | + #[TentativeType] |
|
164 | + public function isProtected(): bool {} |
|
165 | + |
|
166 | + /** |
|
167 | + * Checks if class constant is public |
|
168 | + * |
|
169 | + * @link https://php.net/manual/en/reflectionclassconstant.ispublic.php |
|
170 | + * @return bool |
|
171 | + * @since 7.1 |
|
172 | + */ |
|
173 | + #[Pure] |
|
174 | + #[TentativeType] |
|
175 | + public function isPublic(): bool {} |
|
176 | + |
|
177 | + /** |
|
178 | + * Returns the string representation of the ReflectionClassConstant object. |
|
179 | + * |
|
180 | + * @link https://php.net/manual/en/reflectionclassconstant.tostring.php |
|
181 | + * @return string |
|
182 | + * @since 7.1 |
|
183 | + */ |
|
184 | + public function __toString(): string {} |
|
185 | + |
|
186 | + /** |
|
187 | + * Returns an array of constant attributes. |
|
188 | + * |
|
189 | + * @param string|null $name Name of an attribute class |
|
190 | + * @param int $flags Сriteria by which the attribute is searched. |
|
191 | + * @return ReflectionAttribute[] |
|
192 | + * @since 8.0 |
|
193 | + */ |
|
194 | + #[Pure] |
|
195 | + public function getAttributes(?string $name = null, int $flags = 0): array {} |
|
196 | + |
|
197 | + /** |
|
198 | + * ReflectionClassConstant cannot be cloned |
|
199 | + * |
|
200 | + * @return void |
|
201 | + */ |
|
202 | + final private function __clone(): void {} |
|
203 | + |
|
204 | + #[PhpStormStubsElementAvailable('8.1')] |
|
205 | + public function isEnumCase(): bool {} |
|
206 | + |
|
207 | + /** |
|
208 | + * @return bool |
|
209 | + * @since 8.1 |
|
210 | + */ |
|
211 | + public function isFinal(): bool {} |
|
212 | 212 | } |
@@ -105,7 +105,7 @@ |
||
105 | 105 | */ |
106 | 106 | #[Pure] |
107 | 107 | #[TentativeType] |
108 | - public function getDocComment(): string|false {} |
|
108 | + public function getDocComment(): string | false {} |
|
109 | 109 | |
110 | 110 | /** |
111 | 111 | * Gets the class constant modifiers |
@@ -13,8 +13,7 @@ |
||
13 | 13 | * @link https://www.php.net/manual/en/class.reflectionclassconstant.php |
14 | 14 | * @since 7.1 |
15 | 15 | */ |
16 | -class ReflectionClassConstant implements Reflector |
|
17 | -{ |
|
16 | +class ReflectionClassConstant implements Reflector { |
|
18 | 17 | /** |
19 | 18 | * @var string Constant name, same as calling the {@see ReflectionClassConstant::getName()} method |
20 | 19 | */ |