| 1 | <?php |
||
| 9 | final class Either |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var mixed |
||
| 13 | */ |
||
| 14 | private $value; |
||
| 15 | /** |
||
| 16 | * @var bool |
||
| 17 | */ |
||
| 18 | private $ensured; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Either constructor. |
||
| 22 | * |
||
| 23 | * @param mixed $value |
||
| 24 | * @param bool $ensured |
||
| 25 | */ |
||
| 26 | public function __construct($value, bool $ensured) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param mixed $value |
||
| 34 | * |
||
| 35 | * @return mixed |
||
| 36 | */ |
||
| 37 | public function or($value) |
||
| 41 | } |
||
| 42 |