forked from vimeo/psalm
/
ClassConstantStorage.php
62 lines (51 loc) · 1.12 KB
/
ClassConstantStorage.php
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
namespace Psalm\Storage;
use Psalm\CodeLocation;
use Psalm\Internal\Analyzer\ClassLikeAnalyzer;
use Psalm\Internal\Scanner\UnresolvedConstantComponent;
use Psalm\Type\Union;
class ClassConstantStorage
{
/**
* @var ?Union
*/
public $type;
/**
* @var ClassLikeAnalyzer::VISIBILITY_*
*/
public $visibility = ClassLikeAnalyzer::VISIBILITY_PUBLIC;
/**
* @var ?CodeLocation
*/
public $location;
/**
* @var ?CodeLocation
*/
public $stmt_location;
/**
* @var ?UnresolvedConstantComponent
*/
public $unresolved_node;
/**
* @var bool
*/
public $deprecated = false;
/**
* @var list<AttributeStorage>
* @psalm-suppress PossiblyUnusedProperty
*/
public $attributes = [];
/**
* @var ?string
*/
public $description;
/**
* @param ClassLikeAnalyzer::VISIBILITY_* $visibility
*/
public function __construct(?Union $type, int $visibility, ?CodeLocation $location)
{
$this->visibility = $visibility;
$this->location = $location;
$this->type = $type;
}
}