diff --git a/src/PhpTry/Attempt.php b/src/PhpTry/Attempt.php index 3155e31..907fd92 100644 --- a/src/PhpTry/Attempt.php +++ b/src/PhpTry/Attempt.php @@ -198,6 +198,8 @@ abstract public function toOption(); * Like `map`, but without caring about the return value of the callable. * Useful for consuming the possible value of the Attempt. * + * @param callable $callable Callable returning a value. + * * @return Attempt The current Attempt */ abstract public function forAll($callable); @@ -224,6 +226,9 @@ public static function call($callable, $arguments = array()) * * The callable will only be called if a method on the Attempt is called. * + * @note Chaining should work as desired, but note that LazyAttempt methods do not return $this, but rather + * return an internal Attempt object. + * * @param callable $callable * @param array $arguments Optional arguments for the callable. * diff --git a/src/PhpTry/LazyAttempt.php b/src/PhpTry/LazyAttempt.php index 4445bfb..b137623 100644 --- a/src/PhpTry/LazyAttempt.php +++ b/src/PhpTry/LazyAttempt.php @@ -4,6 +4,9 @@ /** * Attempt that is evaluated on first access. + * + * @note Chaining should work as desired, but note that LazyAttempt methods do not return $this, but rather + * return an internal Attempt object. */ class LazyAttempt extends Attempt {