1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
This commit is contained in:
Daniil Gentili 2023-10-19 13:37:36 +02:00
parent 7761939832
commit efb86f8866
6 changed files with 6 additions and 15 deletions

View File

@ -12,11 +12,8 @@ use UnexpectedValueException;
*/
final class HasArrayKey extends Assertion
{
public $key;
public function __construct(string $key)
public function __construct(public readonly string $key)
{
$this->key = $key;
}
public function getNegation(): Assertion

View File

@ -11,11 +11,8 @@ use Psalm\Storage\Assertion;
*/
final class IsNotCountable extends Assertion
{
public $is_negatable;
public function __construct(bool $is_negatable)
public function __construct(public readonly bool $is_negatable)
{
$this->is_negatable = $is_negatable;
}
public function isNegation(): bool

View File

@ -11,11 +11,8 @@ use Psalm\Storage\Assertion;
*/
final class NonEmptyCountable extends Assertion
{
public $is_negatable;
public function __construct(bool $is_negatable)
public function __construct(public readonly bool $is_negatable)
{
$this->is_negatable = $is_negatable;
}
public function getNegation(): Assertion

View File

@ -17,7 +17,7 @@ final class PropertyStorage implements HasAttributesInterface
/**
* @var ClassLikeAnalyzer::VISIBILITY_*
*/
public $visibility = ClassLikeAnalyzer::VISIBILITY_PUBLIC;
public int $visibility = ClassLikeAnalyzer::VISIBILITY_PUBLIC;
public ?CodeLocation $location = null;

View File

@ -26,7 +26,7 @@ final class TPropertiesOf extends Atomic
/**
* @var self::VISIBILITY_*|null
*/
public $visibility_filter;
public ?int $visibility_filter;
/**
* @return list<TokenName>

View File

@ -23,7 +23,7 @@ final class TTemplatePropertiesOf extends Atomic
/**
* @var TPropertiesOf::VISIBILITY_*|null
*/
public $visibility_filter;
public ?int $visibility_filter;
/**
* @param TPropertiesOf::VISIBILITY_*|null $visibility_filter