1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Reflection;
4:
5: use PHPStan\TrinaryLogic;
6: use PHPStan\Type\Type;
7:
8: /** @api */
9: interface FunctionReflection
10: {
11:
12: public function getName(): string;
13:
14: public function getFileName(): ?string;
15:
16: /**
17: * @return ParametersAcceptorWithPhpDocs[]
18: */
19: public function getVariants(): array;
20:
21: /**
22: * @return ParametersAcceptorWithPhpDocs[]|null
23: */
24: public function getNamedArgumentsVariants(): ?array;
25:
26: public function isDeprecated(): TrinaryLogic;
27:
28: public function getDeprecatedDescription(): ?string;
29:
30: public function isFinal(): TrinaryLogic;
31:
32: public function isInternal(): TrinaryLogic;
33:
34: public function getThrowType(): ?Type;
35:
36: public function hasSideEffects(): TrinaryLogic;
37:
38: public function isBuiltin(): bool;
39:
40: public function getAsserts(): Assertions;
41:
42: public function getDocComment(): ?string;
43:
44: public function returnsByReference(): TrinaryLogic;
45:
46: /**
47: * This indicates whether the function has phpstan-pure
48: * or phpstan-impure annotation above it.
49: *
50: * In most cases asking hasSideEffects() is much more practical
51: * as it also accounts for void return type (method being always impure).
52: */
53: public function isPure(): TrinaryLogic;
54:
55: }
56: