REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.83 KB
Close
/opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/ondram/ci-detector/src/TrinaryLogic.php
Text
Base64
<?php declare (strict_types=1); namespace RectorPrefix202411\OndraM\CiDetector; /** * @see https://en.wikipedia.org/wiki/Three-valued_logic * @see https://github.com/phpstan/phpstan-src/blob/cedc99f51f7b8d815036e983166d7cb51ab46734/src/TrinaryLogic.php * * @internal */ final class TrinaryLogic { private const YES = 1; private const MAYBE = 0; private const NO = -1; /** @var self[] */ private static $registry = []; /** * @var int */ private $value; private function __construct(int $value) { $this->value = $value; } public static function createMaybe() : self { return self::create(self::MAYBE); } public static function createFromBoolean(bool $value) : self { return self::create($value ? self::YES : self::NO); } /** * Return true if it's known for sure that the value is true */ public function yes() : bool { return $this->value === self::YES; } /** * Return true if it's not known for sure whether the value is true or false */ public function maybe() : bool { return $this->value === self::MAYBE; } /** * Return true if it's known for sure that the value is false */ public function no() : bool { return $this->value === self::NO; } /** * Return string representation of the value. * "Yes" when the value is true, "No" when its false, "Maybe" when it's not known for sure whether its * true or false. */ public function describe() : string { static $labels = [self::NO => 'No', self::MAYBE => 'Maybe', self::YES => 'Yes']; return $labels[$this->value]; } private static function create(int $value) : self { return self::$registry[$value] = self::$registry[$value] ?? new self($value); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Ci
DIR
-
drwxr-xr-x
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Exception
DIR
-
drwxr-xr-x
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CiDetector.php
2.77 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CiDetectorInterface.php
630 B
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Env.php
455 B
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
TrinaryLogic.php
1.83 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).