Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Commit decca86

Browse files
committed
M id format -> to string
1 parent 58868b6 commit decca86

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

source/NavigationBuilder/Services/Builder/Stack.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function hasLink($id): bool
2929
*/
3030
public function addLink(Link $link)
3131
{
32-
$this->links[$link->primaryKey()] = $link;
32+
$this->links[(string)$link->primaryKey()] = $link;
3333
}
3434

3535
/**
@@ -69,7 +69,7 @@ public function hasTree($id): bool
6969
*/
7070
public function addTree(Tree $tree)
7171
{
72-
$this->tree[$tree->primaryKey()] = $tree;
72+
$this->tree[(string)$tree->primaryKey()] = $tree;
7373
}
7474

7575
/**

source/NavigationBuilder/Services/LinkService.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function getList(): array
5050

5151
/** @var Link $link */
5252
foreach ($this->source->find() as $link) {
53-
$output[$link->primaryKey()] = $this->wrapper->wrapLink($link);
53+
$output[(string)$link->primaryKey()] = $this->wrapper->wrapLink($link);
5454
}
5555

5656
return $output;

source/NavigationBuilder/Services/LinkWrapper.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class LinkWrapper
1313
public function wrapLink(Link $link): array
1414
{
1515
return [
16-
'id' => $link->primaryKey(),
16+
'id' => (string)$link->primaryKey(),
1717
'text' => $link->text,
1818
'href' => $link->href,
1919
'attributes' => $link->getAttributes(),

0 commit comments

Comments
 (0)