Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12373564
None.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
642 B
Referenced Files
None
Subscribers
None
None.php
View Options
<?php
namespace
Keruald\OmniTools\DataTypes\Option
;
use
InvalidArgumentException
;
class
None
extends
Option
{
public
function
isSome
()
:
bool
{
return
false
;
}
public
function
isNone
()
:
bool
{
return
true
;
}
public
function
getValue
()
:
mixed
{
throw
new
InvalidArgumentException
(
<<<'EOD'
This option is a none, so it doesn't have a value.
You can check first with isSome() if this is a value.
EOD
);
}
public
function
map
(
callable
$callable
)
:
Option
{
return
$this
;
}
public
function
orElse
(
mixed
$default
)
:
mixed
{
return
$default
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 1, 17:53 (1 d, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3118837
Default Alt Text
None.php (642 B)
Attached To
Mode
rKERUALD Keruald libraries development repository
Attached
Detach File
Event Timeline
Log In to Comment