Skip to content

Commit d871bdb

Browse files
gaetan-hexadogactions-user
authored andcommitted
Automatically applied php-cs-fixer changes
1 parent 1c2a9ef commit d871bdb

File tree

9 files changed

+25
-13
lines changed

9 files changed

+25
-13
lines changed

src/Components/Children.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Hexadog\MenusManager\Components;
44

5+
use Illuminate\Contracts\Support\Htmlable;
6+
use Illuminate\Contracts\View\View;
57
use Illuminate\Support\Collection;
68
use Illuminate\View\Component;
79

@@ -25,7 +27,7 @@ public function __construct(Collection $items)
2527
/**
2628
* Get the view / contents that represents the component.
2729
*
28-
* @return \Closure|\Illuminate\Contracts\Support\Htmlable|\Illuminate\Contracts\View\View|string
30+
* @return \Closure|Htmlable|string|View
2931
*/
3032
public function render()
3133
{

src/Components/Divider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
namespace Hexadog\MenusManager\Components;
44

55
use Hexadog\MenusManager\Item;
6+
use Illuminate\Contracts\Support\Htmlable;
7+
use Illuminate\Contracts\View\View;
68
use Illuminate\View\Component;
79

810
class Divider extends Component
@@ -25,7 +27,7 @@ public function __construct(Item $item)
2527
/**
2628
* Get the view / contents that represents the component.
2729
*
28-
* @return \Closure|\Illuminate\Contracts\Support\Htmlable|\Illuminate\Contracts\View\View|string
30+
* @return \Closure|Htmlable|string|View
2931
*/
3032
public function render()
3133
{

src/Components/Header.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
namespace Hexadog\MenusManager\Components;
44

55
use Hexadog\MenusManager\Item;
6+
use Illuminate\Contracts\Support\Htmlable;
7+
use Illuminate\Contracts\View\View;
68
use Illuminate\View\Component;
79

810
class Header extends Component
@@ -25,7 +27,7 @@ public function __construct(Item $item)
2527
/**
2628
* Get the view / contents that represents the component.
2729
*
28-
* @return \Closure|\Illuminate\Contracts\Support\Htmlable|\Illuminate\Contracts\View\View|string
30+
* @return \Closure|Htmlable|string|View
2931
*/
3032
public function render()
3133
{

src/Components/Icon.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
namespace Hexadog\MenusManager\Components;
44

55
use Hexadog\MenusManager\Item;
6+
use Illuminate\Contracts\Support\Htmlable;
7+
use Illuminate\Contracts\View\View;
68
use Illuminate\View\Component;
79

810
class Icon extends Component
@@ -33,7 +35,7 @@ public function __construct(Item $item)
3335
/**
3436
* Get the view / contents that represents the component.
3537
*
36-
* @return \Closure|\Illuminate\Contracts\Support\Htmlable|\Illuminate\Contracts\View\View|string
38+
* @return \Closure|Htmlable|string|View
3739
*/
3840
public function render()
3941
{

src/Components/Item.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
namespace Hexadog\MenusManager\Components;
44

55
use Hexadog\MenusManager\Item as MenusManagerItem;
6+
use Illuminate\Contracts\Support\Htmlable;
7+
use Illuminate\Contracts\View\View;
68
use Illuminate\View\Component;
79

810
class Item extends Component
@@ -25,7 +27,7 @@ public function __construct(MenusManagerItem $item)
2527
/**
2628
* Get the view / contents that represents the component.
2729
*
28-
* @return \Closure|\Illuminate\Contracts\Support\Htmlable|\Illuminate\Contracts\View\View|string
30+
* @return \Closure|Htmlable|string|View
2931
*/
3032
public function render()
3133
{

src/Components/Menu.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
namespace Hexadog\MenusManager\Components;
44

55
use Hexadog\MenusManager\Facades\Menus;
6+
use Illuminate\Contracts\Support\Htmlable;
7+
use Illuminate\Contracts\View\View;
68
use Illuminate\Support\Collection;
79
use Illuminate\View\Component;
810

@@ -36,7 +38,7 @@ public function __construct($name)
3638
/**
3739
* Get the view / contents that represents the component.
3840
*
39-
* @return \Closure|\Illuminate\Contracts\Support\Htmlable|\Illuminate\Contracts\View\View|string
41+
* @return \Closure|Htmlable|string|View
4042
*/
4143
public function render()
4244
{

src/Item.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Item implements Arrayable
3939
/**
4040
* The hide callbacks collection.
4141
*
42-
* @var \Illuminate\Support\Collection
42+
* @var Collection
4343
*/
4444
protected $visibleCallbacks;
4545

@@ -335,7 +335,7 @@ public function parent()
335335
*
336336
* @return mixed
337337
*/
338-
public function searchBy($key, $value, callable $callback = null): ?Item
338+
public function searchBy($key, $value, ?callable $callback = null): ?Item
339339
{
340340
$matchItem = null;
341341

src/Menu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct(string $name)
3333
*
3434
* @return mixed
3535
*/
36-
public function searchBy($key, $value, callable $callback = null): ?Item
36+
public function searchBy($key, $value, ?callable $callback = null): ?Item
3737
{
3838
$matchItem = null;
3939

src/Traits/HasItems.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)