Skip to content

Commit

Permalink
Principal: be explicit about types of $this->pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmai committed Oct 21, 2018
1 parent 122e337 commit 4727aeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Principal.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private static function apply(iterable $previous, callable $func): \Generator
*/
public function filter(callable $func)
{
if (!$this->pipeline) {
if (null === $this->pipeline || [] === $this->pipeline) {
// No-op: either an empty array or null.
return $this;
}
Expand Down

0 comments on commit 4727aeb

Please sign in to comment.