Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/TrinaryLogic.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,28 @@ private static function create(int $value): self
return self::$registry[$value];
}

/**
* @phpstan-assert-if-true =false $this->no()
* @phpstan-assert-if-true =false $this->maybe()
*/
public function yes(): bool
{
return $this->value === self::YES;
}

/**
* @phpstan-assert-if-true =false $this->no()
* @phpstan-assert-if-true =false $this->yes()
*/
public function maybe(): bool
{
return $this->value === self::MAYBE;
}

/**
* @phpstan-assert-if-true =false $this->maybe()
* @phpstan-assert-if-true =false $this->yes()
*/
public function no(): bool
{
return $this->value === self::NO;
Expand Down
12 changes: 12 additions & 0 deletions src/Type/AcceptsResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,28 @@ public function __construct(
{
}

/**
* @phpstan-assert-if-true =false $this->no()
* @phpstan-assert-if-true =false $this->maybe()
*/
public function yes(): bool
{
return $this->result->yes();
}

/**
* @phpstan-assert-if-true =false $this->no()
* @phpstan-assert-if-true =false $this->yes()
*/
public function maybe(): bool
{
return $this->result->maybe();
}

/**
* @phpstan-assert-if-true =false $this->maybe()
* @phpstan-assert-if-true =false $this->yes()
*/
public function no(): bool
{
return $this->result->no();
Expand Down
12 changes: 12 additions & 0 deletions src/Type/IsSuperTypeOfResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,28 @@ public function __construct(
{
}

/**
* @phpstan-assert-if-true =false $this->no()
* @phpstan-assert-if-true =false $this->maybe()
*/
public function yes(): bool
{
return $this->result->yes();
}

/**
* @phpstan-assert-if-true =false $this->no()
* @phpstan-assert-if-true =false $this->yes()
*/
public function maybe(): bool
{
return $this->result->maybe();
}

/**
* @phpstan-assert-if-true =false $this->maybe()
* @phpstan-assert-if-true =false $this->yes()
*/
public function no(): bool
{
return $this->result->no();
Expand Down
Loading