Skip to content

Commit

Permalink
Update SelectTree.php
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeWithDennis authored Apr 7, 2024
1 parent efbc096 commit bb39c92
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/SelectTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private function buildTree(): Collection
// Combine the results from both queries
$combinedResults = $nullParentResults->concat($nonNullParentResults);

// store results for additional functionality. results are accessible through $component->getResults()
// Store results for additional functionality
if ($this->storeResults) {
$this->results = $combinedResults;
}
Expand Down Expand Up @@ -383,7 +383,6 @@ public function enableBranchNode(bool $enableBranchNode = true): static
return $this;
}

// store results in variable $results
public function storeResults(bool $storeResults = true): static
{
$this->storeResults = $storeResults;
Expand All @@ -395,8 +394,7 @@ public function getTree(): Collection|array
{
return $this->evaluate($this->buildTree());
}

// get results stored in variable $results

public function getResults(): Collection|array|null
{
return $this->results;
Expand Down

0 comments on commit bb39c92

Please sign in to comment.