-
Notifications
You must be signed in to change notification settings - Fork 574
Expand file tree
/
Copy pathPropertyWrite.php
More file actions
45 lines (36 loc) · 962 Bytes
/
PropertyWrite.php
File metadata and controls
45 lines (36 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php declare(strict_types = 1);
namespace PHPStan\Node\Property;
use PhpParser\Node\Expr\AssignRef;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\StaticPropertyFetch;
use PHPStan\Analyser\Scope;
use PHPStan\Node\ClassPropertyNode;
use PHPStan\Node\PropertyAssignNode;
/**
* @api
*/
final class PropertyWrite
{
public function __construct(private PropertyFetch|StaticPropertyFetch $fetch, private Scope $scope, private bool $promotedPropertyWrite, private ClassPropertyNode|PropertyAssignNode|AssignRef|null $originalNode = null)
{
}
/**
* @return PropertyFetch|StaticPropertyFetch
*/
public function getFetch()
{
return $this->fetch;
}
public function getScope(): Scope
{
return $this->scope;
}
public function isPromotedPropertyWrite(): bool
{
return $this->promotedPropertyWrite;
}
public function getOriginalNode(): ClassPropertyNode|PropertyAssignNode|AssignRef|null
{
return $this->originalNode;
}
}