Refactor
This commit is contained in:
parent
c84e6ed25c
commit
8ec5b621c1
3 changed files with 35 additions and 35 deletions
|
@ -9,15 +9,6 @@ use Webmozart\Assert\Assert;
|
|||
|
||||
final class DailyEmails implements \Countable {
|
||||
|
||||
/**
|
||||
* @param array<positive-int, NodeInterface> $emails
|
||||
*/
|
||||
private function __construct(
|
||||
private array $emails,
|
||||
) {
|
||||
Assert::allIsInstanceOf($emails, NodeInterface::class);
|
||||
}
|
||||
|
||||
public function count(): int {
|
||||
return count($this->emails);
|
||||
}
|
||||
|
@ -30,4 +21,13 @@ final class DailyEmails implements \Countable {
|
|||
return new self($emails);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<positive-int, NodeInterface> $emails
|
||||
*/
|
||||
private function __construct(
|
||||
private array $emails,
|
||||
) {
|
||||
Assert::allIsInstanceOf($emails, NodeInterface::class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue