@@ -32,13 +32,11 @@ class Builder
32
32
33
33
/**
34
34
* @internal
35
- *
36
35
*/
37
36
protected ?string $ htmlMenuIdPrefix = null ;
38
37
39
38
/**
40
39
* @internal
41
- *
42
40
*/
43
41
protected string $ pageClass = DocumentPage::class;
44
42
@@ -76,8 +74,8 @@ protected function configureOptions(OptionsResolver $options): void
76
74
77
75
$ options ->setAllowedTypes ('root ' , [Document::class, 'null ' ]);
78
76
$ options ->setAllowedTypes ('htmlMenuPrefix ' , ['string ' , 'null ' ]);
79
- $ options ->setAllowedTypes ('pageCallback ' , [' callable ' , 'null ' ]);
80
- $ options ->setAllowedTypes ('rootCallback ' , [' callable ' , 'null ' ]);
77
+ $ options ->setAllowedTypes ('pageCallback ' , [\Closure::class , 'null ' ]);
78
+ $ options ->setAllowedTypes ('rootCallback ' , [\Closure::class , 'null ' ]);
81
79
$ options ->setAllowedTypes ('cache ' , ['string ' , 'bool ' ]);
82
80
$ options ->setAllowedTypes ('cacheLifetime ' , ['int ' , 'null ' ]);
83
81
$ options ->setAllowedTypes ('maxDepth ' , ['int ' , 'null ' ]);
@@ -94,8 +92,8 @@ protected function resolveOptions(array $options): array
94
92
* @param array{
95
93
* root?: ?Document,
96
94
* htmlMenuPrefix?: ?string,
97
- * pageCallback?: ?callable ,
98
- * rootCallback?: ?callable ,
95
+ * pageCallback?: ?\Closure ,
96
+ * rootCallback?: ?\Closure ,
99
97
* cache?: string|bool,
100
98
* cacheLifetime?: ?int,
101
99
* maxDepth?: ?int,
@@ -184,8 +182,6 @@ public function getNavigation(array $params): Container
184
182
185
183
/**
186
184
* @internal
187
- *
188
- *
189
185
*/
190
186
protected function markActiveTrail (Container $ navigation , ?Document $ activeDocument ): void
191
187
{
@@ -272,7 +268,6 @@ protected function findActivePages(Container $navigation, string $property, stri
272
268
}
273
269
274
270
/**
275
- *
276
271
* @throws \Exception
277
272
*
278
273
* @internal
@@ -316,15 +311,13 @@ public function setPageClass(string $pageClass): static
316
311
317
312
/**
318
313
* Returns the name of the pageclass
319
- *
320
314
*/
321
315
public function getPageClass (): string
322
316
{
323
317
return $ this ->pageClass ;
324
318
}
325
319
326
320
/**
327
- *
328
321
* @return Document[]
329
322
*/
330
323
protected function getChildren (Document $ parentDocument ): array
@@ -339,7 +332,6 @@ protected function getChildren(Document $parentDocument): array
339
332
}
340
333
341
334
/**
342
- *
343
335
* @return Page[]
344
336
*
345
337
* @throws \Exception
0 commit comments