1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Node\Property;
4:
5: use PhpParser\Node\Expr\PropertyFetch;
6: use PhpParser\Node\Expr\StaticPropertyFetch;
7: use PHPStan\Analyser\Scope;
8: use PHPStan\Turbo\ReferencedByTurboExtension;
9:
10: /**
11: * @api
12: */
13: #[ReferencedByTurboExtension(key: 'propertyRead')]
14: final class PropertyRead
15: {
16:
17: public function __construct(
18: private PropertyFetch|StaticPropertyFetch $fetch,
19: private Scope $scope,
20: )
21: {
22: }
23:
24: /**
25: * @return PropertyFetch|StaticPropertyFetch
26: */
27: public function getFetch()
28: {
29: return $this->fetch;
30: }
31:
32: public function getScope(): Scope
33: {
34: return $this->scope;
35: }
36:
37: }
38: