1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-10 23:18:40 +01:00
psalm/src/Psalm/Storage/Assertion.php

43 lines
680 B
PHP
Raw Normal View History

<?php
namespace Psalm\Storage;
use Psalm\Type\Atomic;
2022-10-03 11:32:15 +02:00
/**
* @psalm-immutable
*/
abstract class Assertion
{
2022-10-03 11:32:15 +02:00
use ImmutableNonCloneableTrait;
abstract public function getNegation(): Assertion;
abstract public function isNegationOf(self $assertion): bool;
abstract public function __toString(): string;
public function isNegation(): bool
{
return false;
}
public function hasEquality(): bool
{
return false;
}
public function getAtomicType(): ?Atomic
{
return null;
}
2022-10-03 11:32:15 +02:00
/**
* @return static
*/
public function setAtomicType(Atomic $type): self
{
2022-10-03 11:32:15 +02:00
return $this;
}
}