2020-10-05 15:50:32 +02:00
|
|
|
<?php
|
|
|
|
namespace Psalm\Storage;
|
|
|
|
|
|
|
|
use Psalm\CodeLocation;
|
|
|
|
use Psalm\Internal\Analyzer\ClassLikeAnalyzer;
|
|
|
|
use Psalm\Type;
|
|
|
|
|
|
|
|
class ClassConstantStorage
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var ?Type\Union
|
|
|
|
*/
|
|
|
|
public $type;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var ClassLikeAnalyzer::VISIBILITY_*
|
|
|
|
*/
|
|
|
|
public $visibility = 1;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var ?CodeLocation
|
|
|
|
*/
|
|
|
|
public $location;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var ?CodeLocation
|
|
|
|
*/
|
|
|
|
public $stmt_location;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var ?\Psalm\Internal\Scanner\UnresolvedConstantComponent
|
|
|
|
*/
|
2021-09-26 23:24:07 +02:00
|
|
|
public $unresolved_node;
|
2020-10-05 15:50:32 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
public $deprecated = false;
|
|
|
|
|
2020-10-24 06:10:22 +02:00
|
|
|
/**
|
|
|
|
* @var list<AttributeStorage>
|
|
|
|
*/
|
|
|
|
public $attributes = [];
|
|
|
|
|
2021-02-24 16:14:04 +01:00
|
|
|
/**
|
|
|
|
* @var ?string
|
|
|
|
*/
|
|
|
|
public $description;
|
|
|
|
|
2020-10-05 15:50:32 +02:00
|
|
|
/**
|
|
|
|
* @param ClassLikeAnalyzer::VISIBILITY_* $visibility
|
|
|
|
*/
|
|
|
|
public function __construct(?Type\Union $type, int $visibility, ?CodeLocation $location)
|
|
|
|
{
|
|
|
|
$this->visibility = $visibility;
|
|
|
|
$this->location = $location;
|
|
|
|
$this->type = $type;
|
|
|
|
}
|
|
|
|
}
|