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