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

Add support for AsPipeline concern #304

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Update code style in the name of elegance
stevenmaguire committed Jan 10, 2025
commit 8db415007854fda81f9caacfdd6f4b5db7c2c89c
8 changes: 1 addition & 7 deletions src/Concerns/AsPipeline.php
Original file line number Diff line number Diff line change
@@ -31,12 +31,6 @@ public function asPipeline(mixed ...$arguments): mixed
$passable = array_shift($arguments);
$closure = array_pop($arguments);

$returned = $this->handle($passable);

if (! is_null($returned)) {
return $closure($returned);
}

return $closure($passable);
return $closure($this->handle($passable) ?? $passable);
}
}