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