Feat: Upgrading Lunar to 1.5
This commit is contained in:
+3
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Modules\Core\Option;
|
||||
|
||||
use RuntimeException;
|
||||
use ArrayIterator;
|
||||
use Exception;
|
||||
|
||||
@@ -56,7 +57,7 @@ final class Some extends Option
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
public function getOrThrow(\Exception $ex)
|
||||
public function getOrThrow(Exception $ex)
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
@@ -88,7 +89,7 @@ final class Some extends Option
|
||||
/** @var mixed */
|
||||
$rs = $callable($this->value);
|
||||
if (!$rs instanceof Option) {
|
||||
throw new \RuntimeException(
|
||||
throw new RuntimeException(
|
||||
"Callables passed to flatMap() must return an Option. Maybe you should use map() instead?",
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user