@@ -25,19 +25,19 @@ class Menu implements Item, Countable, HasHtmlAttributes, HasParentAttributes, I
2525
2626 protected array $ filters = [];
2727
28- protected string | Item $ prepend = '' ;
28+ protected string | Item $ prepend = '' ;
2929
30- protected string | Item $ append = '' ;
30+ protected string | Item $ append = '' ;
3131
3232 protected array $ wrap = [];
3333
3434 protected string $ activeClass = 'active ' ;
3535
3636 protected string $ exactActiveClass = 'exact-active ' ;
3737
38- protected string | null $ wrapperTagName = 'ul ' ;
38+ protected string | null $ wrapperTagName = 'ul ' ;
3939
40- protected string | null $ parentTagName = 'li ' ;
40+ protected string | null $ parentTagName = 'li ' ;
4141
4242 protected bool $ activeClassOnParent = true ;
4343
@@ -78,7 +78,7 @@ public static function new($items = []): static
7878 *
7979 * @return static
8080 */
81- public static function build (array | \Iterator $ items , callable $ callback , self | null $ initial = null ): static
81+ public static function build (array | \Iterator $ items , callable $ callback , self | null $ initial = null ): static
8282 {
8383 return ($ initial ?: static ::new ())->fill ($ items , $ callback );
8484 }
@@ -93,7 +93,7 @@ public static function build(array|\Iterator $items, callable $callback, self|nu
9393 *
9494 * @return static
9595 */
96- public function fill (array | \Iterator $ items , callable $ callback ): self
96+ public function fill (array | \Iterator $ items , callable $ callback ): self
9797 {
9898 $ menu = $ this ;
9999
@@ -131,7 +131,7 @@ public function add(Item $item): self
131131 *
132132 * @return $this
133133 */
134- public function addIf (bool | callable $ condition , Item $ item ): self
134+ public function addIf (bool | callable $ condition , Item $ item ): self
135135 {
136136 if ($ this ->resolveCondition ($ condition )) {
137137 $ this ->add ($ item );
@@ -172,7 +172,7 @@ public function empty(): self
172172 *
173173 * @return $this
174174 */
175- public function linkIf (bool | callable $ condition , string $ url , string $ text ): self
175+ public function linkIf (bool | callable $ condition , string $ url , string $ text ): self
176176 {
177177 if ($ this ->resolveCondition ($ condition )) {
178178 $ this ->link ($ url , $ text );
@@ -203,7 +203,7 @@ public function html(string $html, array $parentAttributes = []): self
203203 *
204204 * @return $this
205205 */
206- public function htmlIf (bool | callable $ condition , string $ html , array $ parentAttributes = []): self
206+ public function htmlIf (bool | callable $ condition , string $ html , array $ parentAttributes = []): self
207207 {
208208 if ($ this ->resolveCondition ($ condition )) {
209209 $ this ->html ($ html , $ parentAttributes );
@@ -212,7 +212,7 @@ public function htmlIf(bool|callable $condition, string $html, array $parentAttr
212212 return $ this ;
213213 }
214214
215- public function submenu (callable | self | Item | string $ header , callable | self | null $ menu = null ): self
215+ public function submenu (callable | self | Item | string $ header , callable | self | null $ menu = null ): self
216216 {
217217 [$ header , $ menu ] = $ this ->parseSubmenuArgs (func_get_args ());
218218
@@ -221,7 +221,7 @@ public function submenu(callable|self|Item|string $header, callable|self|null $m
221221 return $ this ->add ($ menu ->prependIf ($ header , $ header ));
222222 }
223223
224- public function submenuIf (bool $ condition , callable | self | Item | string $ header , callable | self | null $ menu = null ): self
224+ public function submenuIf (bool $ condition , callable | self | Item | string $ header , callable | self | null $ menu = null ): self
225225 {
226226 if ($ condition ) {
227227 $ this ->submenu ($ header , $ menu );
@@ -239,7 +239,7 @@ protected function parseSubmenuArgs($args): array
239239 return [$ args [0 ], $ args [1 ]];
240240 }
241241
242- protected function createSubmenuMenu (self | callable $ menu ): self
242+ protected function createSubmenuMenu (self | callable $ menu ): self
243243 {
244244 if (is_callable ($ menu )) {
245245 $ transformer = $ menu ;
@@ -250,7 +250,7 @@ protected function createSubmenuMenu(self|callable $menu): self
250250 return $ menu ;
251251 }
252252
253- protected function createSubmenuHeader (Item | string $ header ): string
253+ protected function createSubmenuHeader (Item | string $ header ): string
254254 {
255255 if ($ header instanceof Item) {
256256 $ header = $ header ->render ();
@@ -399,7 +399,7 @@ public function isExactActive(): bool
399399 *
400400 * @return $this
401401 */
402- public function setActive (callable | string $ urlOrCallable , string $ root = '/ ' ): self
402+ public function setActive (callable | string $ urlOrCallable , string $ root = '/ ' ): self
403403 {
404404 if (is_string ($ urlOrCallable )) {
405405 return $ this ->setActiveFromUrl ($ urlOrCallable , $ root );
@@ -565,7 +565,7 @@ public function setItemParentAttribute(string $attribute, string $value = ''): s
565565 * @param string|null $wrapperTagName
566566 * @return $this
567567 */
568- public function setWrapperTag (string | null $ wrapperTagName = null ): self
568+ public function setWrapperTag (string | null $ wrapperTagName = null ): self
569569 {
570570 $ this ->wrapperTagName = $ wrapperTagName ;
571571
@@ -590,7 +590,7 @@ public function withoutWrapperTag(): self
590590 * @param string|null $parentTagName
591591 * @return $this
592592 */
593- public function setParentTag (string | null $ parentTagName = null ): self
593+ public function setParentTag (string | null $ parentTagName = null ): self
594594 {
595595 $ this ->parentTagName = $ parentTagName ;
596596
0 commit comments