From: widmogrod Date: Wed, 20 Dec 2017 17:44:42 +0000 (+0100) Subject: Simplify Functional\tee X-Git-Tag: 4.0.0~3^2~30 X-Git-Url: http://cameron1729.xyz/?a=commitdiff_plain;h=964e38c8bbc44028268354720a513626c979f7fa;p=php-functional.git Simplify Functional\tee --- diff --git a/src/Functional/functions.php b/src/Functional/functions.php index 2d3b403..3e73869 100644 --- a/src/Functional/functions.php +++ b/src/Functional/functions.php @@ -123,7 +123,7 @@ const tee = 'Widmogrod\Functional\tee'; * * @return \Closure */ -function tee(callable $function = null, $value = null) +function tee(callable $function, $value = null) { return curryN(2, function (callable $function, $value) { $function($value); diff --git a/test/Functional/TeeTest.php b/test/Functional/TeeTest.php index 4a89209..d841ab1 100644 --- a/test/Functional/TeeTest.php +++ b/test/Functional/TeeTest.php @@ -13,8 +13,7 @@ class TeeTest extends \PHPUnit_Framework_TestCase $function, $value ) { - $curried = f\tee(); - $curried = $curried($function); + $curried = f\tee($function); $this->assertEquals($value, $curried($value)); }