1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Reflection;
4:
5: use PHPStan\Type\Type;
6:
7: /**
8: * Reflection for a function/method parameter.
9: *
10: * Represents a single parameter in a function or method signature. Each parameter
11: * has a name, type, and metadata about optionality, variadicity, and pass-by-reference.
12: *
13: * The type returned by getType() is the combined PHPDoc + native type.
14: * For separate PHPDoc and native types, see ExtendedParameterReflection.
15: *
16: * Part of a ParametersAcceptor which describes a complete function signature.
17: *
18: * @api
19: */
20: interface ParameterReflection
21: {
22:
23: public function getName(): string;
24:
25: public function isOptional(): bool;
26:
27: public function getType(): Type;
28:
29: public function passedByReference(): PassedByReference;
30:
31: public function isVariadic(): bool;
32:
33: public function getDefaultValue(): ?Type;
34:
35: }
36: