1: <?php
2:
3: declare(strict_types=1);
4:
5: namespace PHPStan\BetterReflection\Reflection\Adapter;
6:
7: /**
8: * ReflectionParameter::getDocComment() exists since PHP 8.6.
9: * This class is not downgraded so the native return type stays compatible with the parent.
10: *
11: * @psalm-suppress PropertyNotSetInConstructor
12: * @psalm-immutable
13: */
14: final class ReflectionParameterWithDocComment extends ReflectionParameter
15: {
16: public function getDocComment(): string|false
17: {
18: return $this->getBetterReflection()->getDocComment() ?? false;
19: }
20: }
21: