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 acceptsNamedArguments(): bool;
27:
28: public function isDeprecated(): TrinaryLogic;
29:
30: public function getDeprecatedDescription(): ?string;
31:
32: public function isFinal(): TrinaryLogic;
33:
34: public function isInternal(): TrinaryLogic;
35:
36: public function getThrowType(): ?Type;
37:
38: public function hasSideEffects(): TrinaryLogic;
39:
40: public function isBuiltin(): bool;
41:
42: public function getAsserts(): Assertions;
43:
44: public function getDocComment(): ?string;
45:
46: public function returnsByReference(): TrinaryLogic;
47:
48: /**
49: * This indicates whether the function has phpstan-pure
50: * or phpstan-impure annotation above it.
51: *
52: * In most cases asking hasSideEffects() is much more practical
53: * as it also accounts for void return type (method being always impure).
54: */
55: public function isPure(): TrinaryLogic;
56:
57: }
58: