Skip to content

Commit

Permalink
Add "isEmpty" to DocumentCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
theseer committed Mar 6, 2024
1 parent 3ed0f86 commit 393d12a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/document/DocumentCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ public function __construct(Document ...$documents) {
$this->documents = array_values($documents);
}

public function isEmpty(): bool {
return $this->count() === 0;
}

public function count(): int {
return count($this->documents);
}
Expand Down

0 comments on commit 393d12a

Please sign in to comment.