Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No implicit nullables, code style updates #158

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

namespace Pipeline;

function map(callable $func = null): Standard
function map(?callable $func = null): Standard
{
$pipeline = new Standard();

Expand All @@ -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);

Expand Down
1 change: 0 additions & 1 deletion tests/EachTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
use LogicException;
use PHPUnit\Framework\TestCase;
use Pipeline\Standard;

use ArrayIterator;

use function Pipeline\map;
Expand Down
2 changes: 1 addition & 1 deletion tests/StaticAnalysisTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion tests/TuplesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

use ArrayIterator;
use PHPUnit\Framework\TestCase;

use Pipeline\Standard;
use IteratorIterator;

Expand Down
Loading