@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | return $this->filter( |
| 31 | - function ($widget) use ($user) { |
|
| 31 | + function($widget) use ($user) { |
|
| 32 | 32 | |
| 33 | 33 | /* @var WidgetInterface $widget */ |
| 34 | 34 | return $user->hasAnyRole($widget->getAllowedRoles()); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | public function pinned() |
| 46 | 46 | { |
| 47 | 47 | return $this->filter( |
| 48 | - function ($widget) { |
|
| 48 | + function($widget) { |
|
| 49 | 49 | |
| 50 | 50 | /* @var WidgetInterface $widget */ |
| 51 | 51 | return $widget->isPinned(); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | public function column($column, $over = false) |
| 64 | 64 | { |
| 65 | 65 | return $this->filter( |
| 66 | - function ($widget) use ($column, $over) { |
|
| 66 | + function($widget) use ($column, $over) { |
|
| 67 | 67 | |
| 68 | 68 | /* @var WidgetInterface $widget */ |
| 69 | 69 | if ($widget->isPinned()) { |
@@ -24,20 +24,20 @@ |
||
| 24 | 24 | $builder->setSections( |
| 25 | 25 | [ |
| 26 | 26 | [ |
| 27 | - 'fields' => function () use ($widget) { |
|
| 27 | + 'fields' => function() use ($widget) { |
|
| 28 | 28 | return array_map( |
| 29 | - function ($field) { |
|
| 30 | - return 'widget_' . $field; |
|
| 29 | + function($field) { |
|
| 30 | + return 'widget_'.$field; |
|
| 31 | 31 | }, |
| 32 | 32 | $widget->getFormFieldSlugs() |
| 33 | 33 | ); |
| 34 | 34 | } |
| 35 | 35 | ], |
| 36 | 36 | [ |
| 37 | - 'fields' => function () use ($configuration) { |
|
| 37 | + 'fields' => function() use ($configuration) { |
|
| 38 | 38 | return array_map( |
| 39 | - function ($field) { |
|
| 40 | - return 'configuration_' . $field; |
|
| 39 | + function($field) { |
|
| 40 | + return 'configuration_'.$field; |
|
| 41 | 41 | }, |
| 42 | 42 | $configuration->getFormFieldSlugs() |
| 43 | 43 | ); |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | return $this->redirect->to('admin/dashboard/manage'); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - return $this->redirect->to('admin/dashboard/view/' . $dashboard->getSlug()); |
|
| 37 | + return $this->redirect->to('admin/dashboard/view/'.$dashboard->getSlug()); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -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 |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | use Anomaly\DashboardModule\Dashboard\Contract\DashboardInterface; |
| 4 | 4 | use Anomaly\DashboardModule\Widget\WidgetModel; |
| 5 | 5 | use Anomaly\Streams\Platform\Model\Dashboard\DashboardDashboardsEntryModel; |
| 6 | -use Anomaly\Streams\Platform\Model\EloquentCollection; |
|
| 7 | 6 | use Anomaly\UsersModule\Role\RoleCollection; |
| 8 | 7 | |
| 9 | 8 | /** |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * Return the modal for choosing a widget. |
| 36 | 36 | * |
| 37 | 37 | * @param ExtensionCollection $extensions |
| 38 | - * @return \Illuminate\Contracts\View\View|mixed |
|
| 38 | + * @return \Illuminate\Contracts\View\View |
|
| 39 | 39 | */ |
| 40 | 40 | public function choose(ExtensionCollection $extensions) |
| 41 | 41 | { |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | * Create a new entry. |
| 50 | 50 | * |
| 51 | 51 | * @param ExtensionCollection $extensions |
| 52 | - * @param WidgetExtensionFormBuilder|WidgetFormBuilder $form |
|
| 52 | + * @param WidgetExtensionFormBuilder $form |
|
| 53 | 53 | * @param WidgetFormBuilder $widget |
| 54 | 54 | * @param ConfigurationFormBuilder $configuration |
| 55 | 55 | * @return \Symfony\Component\HttpFoundation\Response |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | * Edit an existing entry. |
| 74 | 74 | * |
| 75 | 75 | * @param ExtensionCollection $extensions |
| 76 | - * @param WidgetExtensionFormBuilder|WidgetFormBuilder $form |
|
| 76 | + * @param WidgetExtensionFormBuilder $form |
|
| 77 | 77 | * @param WidgetFormBuilder $widget |
| 78 | 78 | * @param ConfigurationFormBuilder $configuration |
| 79 | 79 | * @return \Symfony\Component\HttpFoundation\Response |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | /** |
| 102 | 102 | * Get the data. |
| 103 | 103 | * |
| 104 | - * @return WidgetData |
|
| 104 | + * @return WidgetCollection |
|
| 105 | 105 | */ |
| 106 | 106 | public function getData() |
| 107 | 107 | { |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | /** |
| 148 | 148 | * Return the widget output. |
| 149 | 149 | * |
| 150 | - * @return string |
|
| 150 | + * @return \Illuminate\Contracts\View\View |
|
| 151 | 151 | */ |
| 152 | 152 | public function output() |
| 153 | 153 | { |