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:
9: /**
10: * @api
11: */
12: final class PropertyWrite
13: {
14:
15: public function __construct(private PropertyFetch|StaticPropertyFetch $fetch, private Scope $scope, private bool $promotedPropertyWrite)
16: {
17: }
18:
19: /**
20: * @return PropertyFetch|StaticPropertyFetch
21: */
22: public function getFetch()
23: {
24: return $this->fetch;
25: }
26:
27: public function getScope(): Scope
28: {
29: return $this->scope;
30: }
31:
32: public function isPromotedPropertyWrite(): bool
33: {
34: return $this->promotedPropertyWrite;
35: }
36:
37: }
38: