Skip to content

Commit 59cc51a

Browse files
gaetan-hexadogactions-user
authored andcommitted
Automatically applied php-cs-fixer changes
1 parent ea155ef commit 59cc51a

File tree

5 files changed

+12
-21
lines changed

5 files changed

+12
-21
lines changed

src/Components/Menu.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ class Menu extends Component
2525
/**
2626
* Create the component instance.
2727
*
28-
* @param string $type
29-
* @param string $message
30-
* @param mixed $name
28+
* @param mixed $name
3129
*/
3230
public function __construct($name)
3331
{

src/Item.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Hexadog\MenusManager;
44

5-
use Closure;
65
use Hexadog\MenusManager\Traits\HasItems;
76
use Illuminate\Contracts\Support\Arrayable;
87
use Illuminate\Support\Arr;
@@ -79,7 +78,7 @@ public function __get($key)
7978

8079
$value = Arr::get($this->properties, $key);
8180

82-
if ($value instanceof Closure) {
81+
if ($value instanceof \Closure) {
8382
$value = $value();
8483
}
8584

@@ -331,9 +330,8 @@ public function parent()
331330
/**
332331
* Search item by key and value recursively.
333332
*
334-
* @param string $key
335-
* @param string $value
336-
* @param callable $callback
333+
* @param string $key
334+
* @param string $value
337335
*
338336
* @return mixed
339337
*/

src/Menu.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ public function __construct(string $name)
2828
/**
2929
* Search item by key and value recursively.
3030
*
31-
* @param string $key
32-
* @param string $value
33-
* @param callable $callback
31+
* @param string $key
32+
* @param string $value
3433
*
3534
* @return mixed
3635
*/

src/MenusManager.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ public function all(): array
4545
/**
4646
* Register a menu or get the existing one.
4747
*
48-
* @param string $name
49-
* @param \Closure $callback
50-
*
51-
* @return \Hexadog\MenusManager\Menu
48+
* @param string $name
5249
*/
5350
public function register($name): Menu
5451
{

src/Traits/HasItems.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Hexadog\MenusManager\Traits;
44

5-
use Closure;
65
use Hexadog\MenusManager\Item;
76
use Illuminate\Support\Collection;
87

@@ -69,9 +68,9 @@ public function findBy(string $key, string $value): ?Item
6968
*
7069
* @return mixed
7170
*/
72-
public function findByTitleOrAdd(string|Closure $title, array $attributes = []): ?Item
71+
public function findByTitleOrAdd(string|\Closure $title, array $attributes = []): ?Item
7372
{
74-
if (!($item = $this->findBy('title', $title instanceof Closure ? $title() : $title))) {
73+
if (!($item = $this->findBy('title', $title instanceof \Closure ? $title() : $title))) {
7574
$item = $this->add(compact('title', 'attributes'));
7675
}
7776

@@ -81,7 +80,7 @@ public function findByTitleOrAdd(string|Closure $title, array $attributes = []):
8180
/**
8281
* Add new header menu item.
8382
*/
84-
public function header(string|Closure $title, array $attributes = []): Item
83+
public function header(string|\Closure $title, array $attributes = []): Item
8584
{
8685
return $this->add(compact('title', 'attributes'))->asHeader();
8786
}
@@ -103,15 +102,15 @@ public function items()
103102
*
104103
* @param mixed $route
105104
*/
106-
public function route($route, string|Closure $title, array $attributes = []): Item
105+
public function route($route, string|\Closure $title, array $attributes = []): Item
107106
{
108107
return $this->add(compact('route', 'title', 'attributes'));
109108
}
110109

111110
/**
112111
* Register new menu item using url.
113112
*/
114-
public function url(string $url, string|Closure $title, array $attributes = []): Item
113+
public function url(string $url, string|\Closure $title, array $attributes = []): Item
115114
{
116115
return $this->add(compact('url', 'title', 'attributes'));
117116
}

0 commit comments

Comments
 (0)