for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Dgame\Optional;
/**
* @param mixed $value
*
* @return Some
*/
function some($value): Some
{
return new Some($value);
}
* @return None
function none(): None
return None::instance();
* @return Optional
function maybe($value): Optional
return $value !== null ? some($value) : none();