Skip to content

Commit 162c691

Browse files
authored
Handling childs fix (#2)
1 parent a76360f commit 162c691

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Collections/RelatedUsersCollection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct(array $initial = [])
1616
public function append(string $userId, string $relatedUserId): self
1717
{
1818
$this->appendTo($userId, $relatedUserId);
19-
$this->handleChilds($userId, $relatedUserId);
19+
$this->handleChilds((string)$userId, (string)$relatedUserId);
2020

2121
//updating child's
2222
foreach ($this->relatedUsers as $key => $childs) {
@@ -31,8 +31,8 @@ public function append(string $userId, string $relatedUserId): self
3131
private function handleChilds(string $userId, string $relatedUserId): void
3232
{
3333
foreach ($this->relatedUsers[$userId] as $childId) {
34-
$this->appendTo($childId, $userId);
35-
$this->appendTo($childId, $relatedUserId);
34+
$this->appendTo((string) $childId, (string)$userId);
35+
$this->appendTo((string) $childId, (string) $relatedUserId);
3636
}
3737
}
3838

0 commit comments

Comments
 (0)