Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Lander Vanderstraeten committed May 16, 2019
1 parent 5090669 commit e3fc41d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Collection/TasksCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function filterByContext(ContextInterface $context): self
public function filterByTestSuite(TestSuiteInterface $testSuite = null): self
{
if (null === $testSuite) {
return new self($this->toArray());
return $this;
}

return $this->filter(function (TaskInterface $task) use ($testSuite) {
Expand All @@ -40,7 +40,7 @@ public function filterByTestSuite(TestSuiteInterface $testSuite = null): self
public function filterByTaskNames(array $tasks): self
{
if (empty($tasks)) {
return new self($this->toArray());
return $this;
}

return $this->filter(function (TaskInterface $task) use ($tasks) {
Expand Down

0 comments on commit e3fc41d

Please sign in to comment.