diff --git a/src/functions.php b/src/functions.php index 856e4f6..50262c4 100644 --- a/src/functions.php +++ b/src/functions.php @@ -19,7 +19,7 @@ namespace Pipeline; -function map(callable $func = null): Standard +function map(?callable $func = null): Standard { $pipeline = new Standard(); @@ -30,7 +30,7 @@ function map(callable $func = null): Standard return $pipeline->map($func); } -function take(iterable $input = null, iterable ...$inputs): Standard +function take(?iterable $input = null, iterable ...$inputs): Standard { $pipeline = new Standard($input); diff --git a/tests/EachTest.php b/tests/EachTest.php index 46e9039..b4db21d 100644 --- a/tests/EachTest.php +++ b/tests/EachTest.php @@ -22,7 +22,6 @@ use LogicException; use PHPUnit\Framework\TestCase; use Pipeline\Standard; - use ArrayIterator; use function Pipeline\map; diff --git a/tests/StaticAnalysisTest.php b/tests/StaticAnalysisTest.php index 124dbff..788821c 100644 --- a/tests/StaticAnalysisTest.php +++ b/tests/StaticAnalysisTest.php @@ -71,7 +71,7 @@ public function testAllMethodsArePublicOrPrivate(ReflectionMethod $method): void */ public function testInterfaceCompatibilityPHP71(): void { - $example = new class () extends Standard { + $example = new class extends Standard { private $input; public function __construct(iterable $input = null) diff --git a/tests/TuplesTest.php b/tests/TuplesTest.php index e1250ab..3a19324 100644 --- a/tests/TuplesTest.php +++ b/tests/TuplesTest.php @@ -21,7 +21,6 @@ use ArrayIterator; use PHPUnit\Framework\TestCase; - use Pipeline\Standard; use IteratorIterator;