Skip to content

Commit

Permalink
simplifies method
Browse files Browse the repository at this point in the history
  • Loading branch information
schmittjoh committed May 19, 2013
1 parent d5e27e2 commit 1c7e801
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/PhpOption/LazyOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,7 @@ public function ifDefined($callable)

public function forAll($callable)
{
$option = $this->option();
$option->forAll($callable);

// We also automatically un-wrap the LazyOption as it is just creating one
// more method call on subsequent calls from this point on.
return $option;
return $this->option()->forAll($callable);
}

public function map($callable)
Expand Down

0 comments on commit 1c7e801

Please sign in to comment.