Skip to content

Commit 6b99446

Browse files
committed
fix(navigation): Correct syntax in NavigationItem for consistency
- Adjusted spacing in the anonymous function definition for children mapping. - Added a missing comma in the jsonSerialize method output for proper array formatting.
1 parent 86837a4 commit 6b99446

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Model/NavigationItem.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Class NavigationItem
99
*
1010
* Represents a navigation item from the dotCMS Navigation API.
11-
*
11+
*
1212
* Note: This class doesn't extend AbstractModel because we have a well-defined
1313
* structure with public properties, making array access unnecessary. We only
1414
* implement JsonSerializable for JSON conversion.
@@ -51,7 +51,7 @@ public function __construct(
5151
// Map children to NavigationItem objects if they exist
5252
if ($this->children !== null) {
5353
$this->childrenItems = array_map(
54-
fn($child) => new self(
54+
fn ($child) => new self(
5555
$child['code'] ?? null,
5656
$child['folder'] ?? null,
5757
$child['host'],
@@ -127,7 +127,7 @@ public function jsonSerialize(): array
127127
'hash' => $this->hash,
128128
'target' => $this->target,
129129
'order' => $this->order,
130-
'children' => $this->childrenItems
130+
'children' => $this->childrenItems,
131131
];
132132
}
133133
}

0 commit comments

Comments
 (0)