3 declare(strict_types=1);
33 abstract public function transform($from);
40 return $result->
then(
function ($value):
Result {
42 return new Ok($this->transform($value));
44 return new Error($exception);
then(callable $f)
Get a new result from the callable or do nothing if this is an error.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A result encapsulates a value or an error and simplifies the handling of those.
A result encapsulates a value or an error and simplifies the handling of those.