@@ -68,7 +68,7 @@ public function findBy(string $key, string $value): ?Item
6868 *
6969 * @return mixed
7070 */
71- public function findByTitleOrAdd (string | \Closure $ title , array $ attributes = []): ?Item
71+ public function findByTitleOrAdd (\Closure | string $ title , array $ attributes = []): ?Item
7272 {
7373 if (!($ item = $ this ->findBy ('title ' , $ title instanceof \Closure ? $ title () : $ title ))) {
7474 $ item = $ this ->add (compact ('title ' , 'attributes ' ));
@@ -80,7 +80,7 @@ public function findByTitleOrAdd(string|\Closure $title, array $attributes = [])
8080 /**
8181 * Add new header menu item.
8282 */
83- public function header (string | \Closure $ title , array $ attributes = []): Item
83+ public function header (\Closure | string $ title , array $ attributes = []): Item
8484 {
8585 return $ this ->add (compact ('title ' , 'attributes ' ))->asHeader ();
8686 }
@@ -102,15 +102,15 @@ public function items()
102102 *
103103 * @param mixed $route
104104 */
105- public function route ($ route , string | \Closure $ title , array $ attributes = []): Item
105+ public function route ($ route , \Closure | string $ title , array $ attributes = []): Item
106106 {
107107 return $ this ->add (compact ('route ' , 'title ' , 'attributes ' ));
108108 }
109109
110110 /**
111111 * Register new menu item using url.
112112 */
113- public function url (string $ url , string | \Closure $ title , array $ attributes = []): Item
113+ public function url (string $ url , \Closure | string $ title , array $ attributes = []): Item
114114 {
115115 return $ this ->add (compact ('url ' , 'title ' , 'attributes ' ));
116116 }
0 commit comments