@@ -39,7 +39,7 @@ |
||
| 39 | 39 | /** |
| 40 | 40 | * Find a model in the collection by key. |
| 41 | 41 | * |
| 42 | - * @param mixed $key |
|
| 42 | + * @param DashboardInterface $key |
|
| 43 | 43 | * @param mixed $default |
| 44 | 44 | * @return \Illuminate\Database\Eloquent\Model |
| 45 | 45 | */ |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | return $this->filter( |
| 31 | - function (DashboardInterface $dashboard) use ($user) { |
|
| 31 | + function(DashboardInterface $dashboard) use ($user) { |
|
| 32 | 32 | $roles = $dashboard->getAllowedRoles(); |
| 33 | 33 | |
| 34 | 34 | return $roles->isEmpty() ?: $user->hasAnyRole($roles); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | return $this->first( |
| 53 | - function (DashboardInterface $model) use ($key) { |
|
| 53 | + function(DashboardInterface $model) use ($key) { |
|
| 54 | 54 | return $model->getId() == $key || $model->getSlug() == $key; |
| 55 | 55 | }, |
| 56 | 56 | $default |