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