diff --git a/app/Classes/RenderNavItem.php b/app/Classes/RenderNavItem.php index 77229dc..0ebec2d 100644 --- a/app/Classes/RenderNavItem.php +++ b/app/Classes/RenderNavItem.php @@ -14,47 +14,48 @@ public static function render(array $item, string $class = ''): string $page = SkyPlugin::get()->getModel('Post')::page()->find($item['data']['page_id']) ?? ''; $activeClass = (request()->routeIs('page', $page)) ? $color : 'border-transparent'; - return '' . - $item['label'] . + return ''. + $item['label']. ''; } elseif ($item['type'] === 'post-link' || $item['type'] === 'post_link') { $post = SkyPlugin::get()->getModel('Post')::find($item['data']['post_id']) ?? ''; $activeClass = (request()->routeIs('post', $post)) ? $color : 'border-transparent'; - return '' . - $item['label'] . + return ''. + $item['label']. ''; } elseif ($item['type'] === 'library-link' || $item['type'] === 'library_link') { $tag = SkyPlugin::get()->getModel('Tag')::find($item['data']['library_id']) ?? ''; $activeClass = (str(request()->url())->contains($tag->library->first()->slug)) ? $color : 'border-transparent'; - return '' . - $item['label'] . + return ''. + $item['label']. ''; } elseif ($item['type'] === 'app-link' || $item['type'] === 'app_link') { $activeClass = (request()->routeIs($item['data']['app_code'])) ? $color : 'border-transparent'; - return '' . - $item['label'] . + >'. + $item['label']. ''; } else { - return '' . - $item['label'] . + return ''. + $item['label']. ''; } } diff --git a/app/Policies/CategoryPolicy.php b/app/Policies/CategoryPolicy.php index 06e8302..744dc9d 100644 --- a/app/Policies/CategoryPolicy.php +++ b/app/Policies/CategoryPolicy.php @@ -3,8 +3,8 @@ namespace App\Policies; use App\Models\User; -use LaraZeus\Bolt\Models\Category; use Illuminate\Auth\Access\HandlesAuthorization; +use LaraZeus\Bolt\Models\Category; class CategoryPolicy { @@ -12,9 +12,6 @@ class CategoryPolicy /** * Determine whether the user can view any models. - * - * @param \App\Models\User $user - * @return bool */ public function viewAny(User $user): bool { @@ -23,10 +20,6 @@ public function viewAny(User $user): bool /** * Determine whether the user can view the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Category $category - * @return bool */ public function view(User $user, Category $category): bool { @@ -35,9 +28,6 @@ public function view(User $user, Category $category): bool /** * Determine whether the user can create models. - * - * @param \App\Models\User $user - * @return bool */ public function create(User $user): bool { @@ -46,10 +36,6 @@ public function create(User $user): bool /** * Determine whether the user can update the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Category $category - * @return bool */ public function update(User $user, Category $category): bool { @@ -58,10 +44,6 @@ public function update(User $user, Category $category): bool /** * Determine whether the user can delete the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Category $category - * @return bool */ public function delete(User $user, Category $category): bool { @@ -70,9 +52,6 @@ public function delete(User $user, Category $category): bool /** * Determine whether the user can bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function deleteAny(User $user): bool { @@ -81,10 +60,6 @@ public function deleteAny(User $user): bool /** * Determine whether the user can permanently delete. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Category $category - * @return bool */ public function forceDelete(User $user, Category $category): bool { @@ -93,9 +68,6 @@ public function forceDelete(User $user, Category $category): bool /** * Determine whether the user can permanently bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDeleteAny(User $user): bool { @@ -104,10 +76,6 @@ public function forceDeleteAny(User $user): bool /** * Determine whether the user can restore. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Category $category - * @return bool */ public function restore(User $user, Category $category): bool { @@ -116,9 +84,6 @@ public function restore(User $user, Category $category): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function restoreAny(User $user): bool { @@ -127,10 +92,6 @@ public function restoreAny(User $user): bool /** * Determine whether the user can replicate. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Category $category - * @return bool */ public function replicate(User $user, Category $category): bool { @@ -139,13 +100,9 @@ public function replicate(User $user, Category $category): bool /** * Determine whether the user can reorder. - * - * @param \App\Models\User $user - * @return bool */ public function reorder(User $user): bool { return $user->can('reorder_category'); } - } diff --git a/app/Policies/CollectionPolicy.php b/app/Policies/CollectionPolicy.php index 8ea0257..caf41ec 100644 --- a/app/Policies/CollectionPolicy.php +++ b/app/Policies/CollectionPolicy.php @@ -3,8 +3,8 @@ namespace App\Policies; use App\Models\User; -use LaraZeus\Bolt\Models\Collection; use Illuminate\Auth\Access\HandlesAuthorization; +use LaraZeus\Bolt\Models\Collection; class CollectionPolicy { @@ -12,9 +12,6 @@ class CollectionPolicy /** * Determine whether the user can view any models. - * - * @param \App\Models\User $user - * @return bool */ public function viewAny(User $user): bool { @@ -23,10 +20,6 @@ public function viewAny(User $user): bool /** * Determine whether the user can view the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Collection $collection - * @return bool */ public function view(User $user, Collection $collection): bool { @@ -35,9 +28,6 @@ public function view(User $user, Collection $collection): bool /** * Determine whether the user can create models. - * - * @param \App\Models\User $user - * @return bool */ public function create(User $user): bool { @@ -46,10 +36,6 @@ public function create(User $user): bool /** * Determine whether the user can update the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Collection $collection - * @return bool */ public function update(User $user, Collection $collection): bool { @@ -58,10 +44,6 @@ public function update(User $user, Collection $collection): bool /** * Determine whether the user can delete the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Collection $collection - * @return bool */ public function delete(User $user, Collection $collection): bool { @@ -70,9 +52,6 @@ public function delete(User $user, Collection $collection): bool /** * Determine whether the user can bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function deleteAny(User $user): bool { @@ -81,10 +60,6 @@ public function deleteAny(User $user): bool /** * Determine whether the user can permanently delete. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Collection $collection - * @return bool */ public function forceDelete(User $user, Collection $collection): bool { @@ -93,9 +68,6 @@ public function forceDelete(User $user, Collection $collection): bool /** * Determine whether the user can permanently bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDeleteAny(User $user): bool { @@ -104,10 +76,6 @@ public function forceDeleteAny(User $user): bool /** * Determine whether the user can restore. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Collection $collection - * @return bool */ public function restore(User $user, Collection $collection): bool { @@ -116,9 +84,6 @@ public function restore(User $user, Collection $collection): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function restoreAny(User $user): bool { @@ -127,10 +92,6 @@ public function restoreAny(User $user): bool /** * Determine whether the user can replicate. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Collection $collection - * @return bool */ public function replicate(User $user, Collection $collection): bool { @@ -139,13 +100,9 @@ public function replicate(User $user, Collection $collection): bool /** * Determine whether the user can reorder. - * - * @param \App\Models\User $user - * @return bool */ public function reorder(User $user): bool { return $user->can('reorder_collection'); } - } diff --git a/app/Policies/DepartmentPolicy.php b/app/Policies/DepartmentPolicy.php index 3d2c3f8..9a2d236 100644 --- a/app/Policies/DepartmentPolicy.php +++ b/app/Policies/DepartmentPolicy.php @@ -3,8 +3,8 @@ namespace App\Policies; use App\Models\User; -use LaraZeus\Wind\Models\Department; use Illuminate\Auth\Access\HandlesAuthorization; +use LaraZeus\Wind\Models\Department; class DepartmentPolicy { @@ -12,9 +12,6 @@ class DepartmentPolicy /** * Determine whether the user can view any models. - * - * @param \App\Models\User $user - * @return bool */ public function viewAny(User $user): bool { @@ -23,10 +20,6 @@ public function viewAny(User $user): bool /** * Determine whether the user can view the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Wind\Models\Department $department - * @return bool */ public function view(User $user, Department $department): bool { @@ -35,9 +28,6 @@ public function view(User $user, Department $department): bool /** * Determine whether the user can create models. - * - * @param \App\Models\User $user - * @return bool */ public function create(User $user): bool { @@ -46,10 +36,6 @@ public function create(User $user): bool /** * Determine whether the user can update the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Wind\Models\Department $department - * @return bool */ public function update(User $user, Department $department): bool { @@ -58,10 +44,6 @@ public function update(User $user, Department $department): bool /** * Determine whether the user can delete the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Wind\Models\Department $department - * @return bool */ public function delete(User $user, Department $department): bool { @@ -70,9 +52,6 @@ public function delete(User $user, Department $department): bool /** * Determine whether the user can bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function deleteAny(User $user): bool { @@ -81,10 +60,6 @@ public function deleteAny(User $user): bool /** * Determine whether the user can permanently delete. - * - * @param \App\Models\User $user - * @param \LaraZeus\Wind\Models\Department $department - * @return bool */ public function forceDelete(User $user, Department $department): bool { @@ -93,9 +68,6 @@ public function forceDelete(User $user, Department $department): bool /** * Determine whether the user can permanently bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDeleteAny(User $user): bool { @@ -104,10 +76,6 @@ public function forceDeleteAny(User $user): bool /** * Determine whether the user can restore. - * - * @param \App\Models\User $user - * @param \LaraZeus\Wind\Models\Department $department - * @return bool */ public function restore(User $user, Department $department): bool { @@ -116,9 +84,6 @@ public function restore(User $user, Department $department): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function restoreAny(User $user): bool { @@ -127,10 +92,6 @@ public function restoreAny(User $user): bool /** * Determine whether the user can replicate. - * - * @param \App\Models\User $user - * @param \LaraZeus\Wind\Models\Department $department - * @return bool */ public function replicate(User $user, Department $department): bool { @@ -139,13 +100,9 @@ public function replicate(User $user, Department $department): bool /** * Determine whether the user can reorder. - * - * @param \App\Models\User $user - * @return bool */ public function reorder(User $user): bool { return $user->can('reorder_department'); } - } diff --git a/app/Policies/FaqPolicy.php b/app/Policies/FaqPolicy.php index 10c89cf..ebbf2ff 100644 --- a/app/Policies/FaqPolicy.php +++ b/app/Policies/FaqPolicy.php @@ -3,8 +3,8 @@ namespace App\Policies; use App\Models\User; -use LaraZeus\Sky\Models\Faq; use Illuminate\Auth\Access\HandlesAuthorization; +use LaraZeus\Sky\Models\Faq; class FaqPolicy { @@ -12,9 +12,6 @@ class FaqPolicy /** * Determine whether the user can view any models. - * - * @param \App\Models\User $user - * @return bool */ public function viewAny(User $user): bool { @@ -23,10 +20,6 @@ public function viewAny(User $user): bool /** * Determine whether the user can view the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Faq $faq - * @return bool */ public function view(User $user, Faq $faq): bool { @@ -35,9 +28,6 @@ public function view(User $user, Faq $faq): bool /** * Determine whether the user can create models. - * - * @param \App\Models\User $user - * @return bool */ public function create(User $user): bool { @@ -46,10 +36,6 @@ public function create(User $user): bool /** * Determine whether the user can update the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Faq $faq - * @return bool */ public function update(User $user, Faq $faq): bool { @@ -58,10 +44,6 @@ public function update(User $user, Faq $faq): bool /** * Determine whether the user can delete the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Faq $faq - * @return bool */ public function delete(User $user, Faq $faq): bool { @@ -70,9 +52,6 @@ public function delete(User $user, Faq $faq): bool /** * Determine whether the user can bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function deleteAny(User $user): bool { @@ -81,10 +60,6 @@ public function deleteAny(User $user): bool /** * Determine whether the user can permanently delete. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Faq $faq - * @return bool */ public function forceDelete(User $user, Faq $faq): bool { @@ -93,9 +68,6 @@ public function forceDelete(User $user, Faq $faq): bool /** * Determine whether the user can permanently bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDeleteAny(User $user): bool { @@ -104,10 +76,6 @@ public function forceDeleteAny(User $user): bool /** * Determine whether the user can restore. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Faq $faq - * @return bool */ public function restore(User $user, Faq $faq): bool { @@ -116,9 +84,6 @@ public function restore(User $user, Faq $faq): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function restoreAny(User $user): bool { @@ -127,10 +92,6 @@ public function restoreAny(User $user): bool /** * Determine whether the user can replicate. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Faq $faq - * @return bool */ public function replicate(User $user, Faq $faq): bool { @@ -139,13 +100,9 @@ public function replicate(User $user, Faq $faq): bool /** * Determine whether the user can reorder. - * - * @param \App\Models\User $user - * @return bool */ public function reorder(User $user): bool { return $user->can('reorder_faq'); } - } diff --git a/app/Policies/FormPolicy.php b/app/Policies/FormPolicy.php index ace70ca..ebd411d 100644 --- a/app/Policies/FormPolicy.php +++ b/app/Policies/FormPolicy.php @@ -3,8 +3,8 @@ namespace App\Policies; use App\Models\User; -use LaraZeus\Bolt\Models\Form; use Illuminate\Auth\Access\HandlesAuthorization; +use LaraZeus\Bolt\Models\Form; class FormPolicy { @@ -12,9 +12,6 @@ class FormPolicy /** * Determine whether the user can view any models. - * - * @param \App\Models\User $user - * @return bool */ public function viewAny(User $user): bool { @@ -23,10 +20,6 @@ public function viewAny(User $user): bool /** * Determine whether the user can view the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Form $form - * @return bool */ public function view(User $user, Form $form): bool { @@ -35,9 +28,6 @@ public function view(User $user, Form $form): bool /** * Determine whether the user can create models. - * - * @param \App\Models\User $user - * @return bool */ public function create(User $user): bool { @@ -46,10 +36,6 @@ public function create(User $user): bool /** * Determine whether the user can update the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Form $form - * @return bool */ public function update(User $user, Form $form): bool { @@ -58,10 +44,6 @@ public function update(User $user, Form $form): bool /** * Determine whether the user can delete the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Form $form - * @return bool */ public function delete(User $user, Form $form): bool { @@ -70,9 +52,6 @@ public function delete(User $user, Form $form): bool /** * Determine whether the user can bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function deleteAny(User $user): bool { @@ -81,10 +60,6 @@ public function deleteAny(User $user): bool /** * Determine whether the user can permanently delete. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Form $form - * @return bool */ public function forceDelete(User $user, Form $form): bool { @@ -93,9 +68,6 @@ public function forceDelete(User $user, Form $form): bool /** * Determine whether the user can permanently bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDeleteAny(User $user): bool { @@ -104,10 +76,6 @@ public function forceDeleteAny(User $user): bool /** * Determine whether the user can restore. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Form $form - * @return bool */ public function restore(User $user, Form $form): bool { @@ -116,9 +84,6 @@ public function restore(User $user, Form $form): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function restoreAny(User $user): bool { @@ -127,10 +92,6 @@ public function restoreAny(User $user): bool /** * Determine whether the user can replicate. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Form $form - * @return bool */ public function replicate(User $user, Form $form): bool { @@ -139,13 +100,9 @@ public function replicate(User $user, Form $form): bool /** * Determine whether the user can reorder. - * - * @param \App\Models\User $user - * @return bool */ public function reorder(User $user): bool { return $user->can('reorder_form'); } - } diff --git a/app/Policies/LayoutPolicy.php b/app/Policies/LayoutPolicy.php index 07ca05f..ae6b44e 100644 --- a/app/Policies/LayoutPolicy.php +++ b/app/Policies/LayoutPolicy.php @@ -3,8 +3,8 @@ namespace App\Policies; use App\Models\User; -use LaraZeus\Rain\Models\Layout; use Illuminate\Auth\Access\HandlesAuthorization; +use LaraZeus\Rain\Models\Layout; class LayoutPolicy { @@ -12,9 +12,6 @@ class LayoutPolicy /** * Determine whether the user can view any models. - * - * @param \App\Models\User $user - * @return bool */ public function viewAny(User $user): bool { @@ -23,10 +20,6 @@ public function viewAny(User $user): bool /** * Determine whether the user can view the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Rain\Models\Layout $layout - * @return bool */ public function view(User $user, Layout $layout): bool { @@ -35,9 +28,6 @@ public function view(User $user, Layout $layout): bool /** * Determine whether the user can create models. - * - * @param \App\Models\User $user - * @return bool */ public function create(User $user): bool { @@ -46,10 +36,6 @@ public function create(User $user): bool /** * Determine whether the user can update the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Rain\Models\Layout $layout - * @return bool */ public function update(User $user, Layout $layout): bool { @@ -58,10 +44,6 @@ public function update(User $user, Layout $layout): bool /** * Determine whether the user can delete the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Rain\Models\Layout $layout - * @return bool */ public function delete(User $user, Layout $layout): bool { @@ -70,9 +52,6 @@ public function delete(User $user, Layout $layout): bool /** * Determine whether the user can bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function deleteAny(User $user): bool { @@ -81,10 +60,6 @@ public function deleteAny(User $user): bool /** * Determine whether the user can permanently delete. - * - * @param \App\Models\User $user - * @param \LaraZeus\Rain\Models\Layout $layout - * @return bool */ public function forceDelete(User $user, Layout $layout): bool { @@ -93,9 +68,6 @@ public function forceDelete(User $user, Layout $layout): bool /** * Determine whether the user can permanently bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDeleteAny(User $user): bool { @@ -104,10 +76,6 @@ public function forceDeleteAny(User $user): bool /** * Determine whether the user can restore. - * - * @param \App\Models\User $user - * @param \LaraZeus\Rain\Models\Layout $layout - * @return bool */ public function restore(User $user, Layout $layout): bool { @@ -116,9 +84,6 @@ public function restore(User $user, Layout $layout): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function restoreAny(User $user): bool { @@ -127,10 +92,6 @@ public function restoreAny(User $user): bool /** * Determine whether the user can replicate. - * - * @param \App\Models\User $user - * @param \LaraZeus\Rain\Models\Layout $layout - * @return bool */ public function replicate(User $user, Layout $layout): bool { @@ -139,13 +100,9 @@ public function replicate(User $user, Layout $layout): bool /** * Determine whether the user can reorder. - * - * @param \App\Models\User $user - * @return bool */ public function reorder(User $user): bool { return $user->can('reorder_layout'); } - } diff --git a/app/Policies/LetterPolicy.php b/app/Policies/LetterPolicy.php index 0ab701d..ef7773a 100644 --- a/app/Policies/LetterPolicy.php +++ b/app/Policies/LetterPolicy.php @@ -3,8 +3,8 @@ namespace App\Policies; use App\Models\User; -use LaraZeus\Wind\Models\Letter; use Illuminate\Auth\Access\HandlesAuthorization; +use LaraZeus\Wind\Models\Letter; class LetterPolicy { @@ -12,9 +12,6 @@ class LetterPolicy /** * Determine whether the user can view any models. - * - * @param \App\Models\User $user - * @return bool */ public function viewAny(User $user): bool { @@ -23,10 +20,6 @@ public function viewAny(User $user): bool /** * Determine whether the user can view the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Wind\Models\Letter $letter - * @return bool */ public function view(User $user, Letter $letter): bool { @@ -35,9 +28,6 @@ public function view(User $user, Letter $letter): bool /** * Determine whether the user can create models. - * - * @param \App\Models\User $user - * @return bool */ public function create(User $user): bool { @@ -46,10 +36,6 @@ public function create(User $user): bool /** * Determine whether the user can update the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Wind\Models\Letter $letter - * @return bool */ public function update(User $user, Letter $letter): bool { @@ -58,10 +44,6 @@ public function update(User $user, Letter $letter): bool /** * Determine whether the user can delete the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Wind\Models\Letter $letter - * @return bool */ public function delete(User $user, Letter $letter): bool { @@ -70,9 +52,6 @@ public function delete(User $user, Letter $letter): bool /** * Determine whether the user can bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function deleteAny(User $user): bool { @@ -81,10 +60,6 @@ public function deleteAny(User $user): bool /** * Determine whether the user can permanently delete. - * - * @param \App\Models\User $user - * @param \LaraZeus\Wind\Models\Letter $letter - * @return bool */ public function forceDelete(User $user, Letter $letter): bool { @@ -93,9 +68,6 @@ public function forceDelete(User $user, Letter $letter): bool /** * Determine whether the user can permanently bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDeleteAny(User $user): bool { @@ -104,10 +76,6 @@ public function forceDeleteAny(User $user): bool /** * Determine whether the user can restore. - * - * @param \App\Models\User $user - * @param \LaraZeus\Wind\Models\Letter $letter - * @return bool */ public function restore(User $user, Letter $letter): bool { @@ -116,9 +84,6 @@ public function restore(User $user, Letter $letter): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function restoreAny(User $user): bool { @@ -127,10 +92,6 @@ public function restoreAny(User $user): bool /** * Determine whether the user can replicate. - * - * @param \App\Models\User $user - * @param \LaraZeus\Wind\Models\Letter $letter - * @return bool */ public function replicate(User $user, Letter $letter): bool { @@ -139,13 +100,9 @@ public function replicate(User $user, Letter $letter): bool /** * Determine whether the user can reorder. - * - * @param \App\Models\User $user - * @return bool */ public function reorder(User $user): bool { return $user->can('reorder_letter'); } - } diff --git a/app/Policies/LibraryPolicy.php b/app/Policies/LibraryPolicy.php index 1ed51c4..49c0356 100644 --- a/app/Policies/LibraryPolicy.php +++ b/app/Policies/LibraryPolicy.php @@ -3,8 +3,8 @@ namespace App\Policies; use App\Models\User; -use LaraZeus\Sky\Models\Library; use Illuminate\Auth\Access\HandlesAuthorization; +use LaraZeus\Sky\Models\Library; class LibraryPolicy { @@ -12,9 +12,6 @@ class LibraryPolicy /** * Determine whether the user can view any models. - * - * @param \App\Models\User $user - * @return bool */ public function viewAny(User $user): bool { @@ -23,10 +20,6 @@ public function viewAny(User $user): bool /** * Determine whether the user can view the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Library $library - * @return bool */ public function view(User $user, Library $library): bool { @@ -35,9 +28,6 @@ public function view(User $user, Library $library): bool /** * Determine whether the user can create models. - * - * @param \App\Models\User $user - * @return bool */ public function create(User $user): bool { @@ -46,10 +36,6 @@ public function create(User $user): bool /** * Determine whether the user can update the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Library $library - * @return bool */ public function update(User $user, Library $library): bool { @@ -58,10 +44,6 @@ public function update(User $user, Library $library): bool /** * Determine whether the user can delete the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Library $library - * @return bool */ public function delete(User $user, Library $library): bool { @@ -70,9 +52,6 @@ public function delete(User $user, Library $library): bool /** * Determine whether the user can bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function deleteAny(User $user): bool { @@ -81,10 +60,6 @@ public function deleteAny(User $user): bool /** * Determine whether the user can permanently delete. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Library $library - * @return bool */ public function forceDelete(User $user, Library $library): bool { @@ -93,9 +68,6 @@ public function forceDelete(User $user, Library $library): bool /** * Determine whether the user can permanently bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDeleteAny(User $user): bool { @@ -104,10 +76,6 @@ public function forceDeleteAny(User $user): bool /** * Determine whether the user can restore. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Library $library - * @return bool */ public function restore(User $user, Library $library): bool { @@ -116,9 +84,6 @@ public function restore(User $user, Library $library): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function restoreAny(User $user): bool { @@ -127,10 +92,6 @@ public function restoreAny(User $user): bool /** * Determine whether the user can replicate. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Library $library - * @return bool */ public function replicate(User $user, Library $library): bool { @@ -139,13 +100,9 @@ public function replicate(User $user, Library $library): bool /** * Determine whether the user can reorder. - * - * @param \App\Models\User $user - * @return bool */ public function reorder(User $user): bool { return $user->can('reorder_library'); } - } diff --git a/app/Policies/NavigationPolicy.php b/app/Policies/NavigationPolicy.php index 4a97dbd..41c6c42 100644 --- a/app/Policies/NavigationPolicy.php +++ b/app/Policies/NavigationPolicy.php @@ -3,8 +3,8 @@ namespace App\Policies; use App\Models\User; -use RyanChandler\FilamentNavigation\Models\Navigation; use Illuminate\Auth\Access\HandlesAuthorization; +use RyanChandler\FilamentNavigation\Models\Navigation; class NavigationPolicy { @@ -12,9 +12,6 @@ class NavigationPolicy /** * Determine whether the user can view any models. - * - * @param \App\Models\User $user - * @return bool */ public function viewAny(User $user): bool { @@ -23,10 +20,6 @@ public function viewAny(User $user): bool /** * Determine whether the user can view the model. - * - * @param \App\Models\User $user - * @param \RyanChandler\FilamentNavigation\Models\Navigation $navigation - * @return bool */ public function view(User $user, Navigation $navigation): bool { @@ -35,9 +28,6 @@ public function view(User $user, Navigation $navigation): bool /** * Determine whether the user can create models. - * - * @param \App\Models\User $user - * @return bool */ public function create(User $user): bool { @@ -46,10 +36,6 @@ public function create(User $user): bool /** * Determine whether the user can update the model. - * - * @param \App\Models\User $user - * @param \RyanChandler\FilamentNavigation\Models\Navigation $navigation - * @return bool */ public function update(User $user, Navigation $navigation): bool { @@ -58,10 +44,6 @@ public function update(User $user, Navigation $navigation): bool /** * Determine whether the user can delete the model. - * - * @param \App\Models\User $user - * @param \RyanChandler\FilamentNavigation\Models\Navigation $navigation - * @return bool */ public function delete(User $user, Navigation $navigation): bool { @@ -70,9 +52,6 @@ public function delete(User $user, Navigation $navigation): bool /** * Determine whether the user can bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function deleteAny(User $user): bool { @@ -81,10 +60,6 @@ public function deleteAny(User $user): bool /** * Determine whether the user can permanently delete. - * - * @param \App\Models\User $user - * @param \RyanChandler\FilamentNavigation\Models\Navigation $navigation - * @return bool */ public function forceDelete(User $user, Navigation $navigation): bool { @@ -93,9 +68,6 @@ public function forceDelete(User $user, Navigation $navigation): bool /** * Determine whether the user can permanently bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDeleteAny(User $user): bool { @@ -104,10 +76,6 @@ public function forceDeleteAny(User $user): bool /** * Determine whether the user can restore. - * - * @param \App\Models\User $user - * @param \RyanChandler\FilamentNavigation\Models\Navigation $navigation - * @return bool */ public function restore(User $user, Navigation $navigation): bool { @@ -116,9 +84,6 @@ public function restore(User $user, Navigation $navigation): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function restoreAny(User $user): bool { @@ -127,10 +92,6 @@ public function restoreAny(User $user): bool /** * Determine whether the user can replicate. - * - * @param \App\Models\User $user - * @param \RyanChandler\FilamentNavigation\Models\Navigation $navigation - * @return bool */ public function replicate(User $user, Navigation $navigation): bool { @@ -139,13 +100,9 @@ public function replicate(User $user, Navigation $navigation): bool /** * Determine whether the user can reorder. - * - * @param \App\Models\User $user - * @return bool */ public function reorder(User $user): bool { return $user->can('reorder_navigation'); } - } diff --git a/app/Policies/PostPolicy.php b/app/Policies/PostPolicy.php index 623ceb4..125f59b 100644 --- a/app/Policies/PostPolicy.php +++ b/app/Policies/PostPolicy.php @@ -3,8 +3,8 @@ namespace App\Policies; use App\Models\User; -use LaraZeus\Sky\Models\Post; use Illuminate\Auth\Access\HandlesAuthorization; +use LaraZeus\Sky\Models\Post; class PostPolicy { @@ -12,9 +12,6 @@ class PostPolicy /** * Determine whether the user can view any models. - * - * @param \App\Models\User $user - * @return bool */ public function viewAny(User $user): bool { @@ -23,10 +20,6 @@ public function viewAny(User $user): bool /** * Determine whether the user can view the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Post $post - * @return bool */ public function view(User $user, Post $post): bool { @@ -35,9 +28,6 @@ public function view(User $user, Post $post): bool /** * Determine whether the user can create models. - * - * @param \App\Models\User $user - * @return bool */ public function create(User $user): bool { @@ -46,10 +36,6 @@ public function create(User $user): bool /** * Determine whether the user can update the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Post $post - * @return bool */ public function update(User $user, Post $post): bool { @@ -58,10 +44,6 @@ public function update(User $user, Post $post): bool /** * Determine whether the user can delete the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Post $post - * @return bool */ public function delete(User $user, Post $post): bool { @@ -70,9 +52,6 @@ public function delete(User $user, Post $post): bool /** * Determine whether the user can bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function deleteAny(User $user): bool { @@ -81,10 +60,6 @@ public function deleteAny(User $user): bool /** * Determine whether the user can permanently delete. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Post $post - * @return bool */ public function forceDelete(User $user, Post $post): bool { @@ -93,9 +68,6 @@ public function forceDelete(User $user, Post $post): bool /** * Determine whether the user can permanently bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDeleteAny(User $user): bool { @@ -104,10 +76,6 @@ public function forceDeleteAny(User $user): bool /** * Determine whether the user can restore. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Post $post - * @return bool */ public function restore(User $user, Post $post): bool { @@ -116,9 +84,6 @@ public function restore(User $user, Post $post): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function restoreAny(User $user): bool { @@ -127,10 +92,6 @@ public function restoreAny(User $user): bool /** * Determine whether the user can replicate. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Post $post - * @return bool */ public function replicate(User $user, Post $post): bool { @@ -139,13 +100,9 @@ public function replicate(User $user, Post $post): bool /** * Determine whether the user can reorder. - * - * @param \App\Models\User $user - * @return bool */ public function reorder(User $user): bool { return $user->can('reorder_post'); } - } diff --git a/app/Policies/ResponsePolicy.php b/app/Policies/ResponsePolicy.php index cb58da0..32e5a6c 100644 --- a/app/Policies/ResponsePolicy.php +++ b/app/Policies/ResponsePolicy.php @@ -3,8 +3,8 @@ namespace App\Policies; use App\Models\User; -use LaraZeus\Bolt\Models\Response; use Illuminate\Auth\Access\HandlesAuthorization; +use LaraZeus\Bolt\Models\Response; class ResponsePolicy { @@ -12,9 +12,6 @@ class ResponsePolicy /** * Determine whether the user can view any models. - * - * @param \App\Models\User $user - * @return bool */ public function viewAny(User $user): bool { @@ -23,10 +20,6 @@ public function viewAny(User $user): bool /** * Determine whether the user can view the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Response $response - * @return bool */ public function view(User $user, Response $response): bool { @@ -35,9 +28,6 @@ public function view(User $user, Response $response): bool /** * Determine whether the user can create models. - * - * @param \App\Models\User $user - * @return bool */ public function create(User $user): bool { @@ -46,10 +36,6 @@ public function create(User $user): bool /** * Determine whether the user can update the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Response $response - * @return bool */ public function update(User $user, Response $response): bool { @@ -58,10 +44,6 @@ public function update(User $user, Response $response): bool /** * Determine whether the user can delete the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Response $response - * @return bool */ public function delete(User $user, Response $response): bool { @@ -70,9 +52,6 @@ public function delete(User $user, Response $response): bool /** * Determine whether the user can bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function deleteAny(User $user): bool { @@ -81,10 +60,6 @@ public function deleteAny(User $user): bool /** * Determine whether the user can permanently delete. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Response $response - * @return bool */ public function forceDelete(User $user, Response $response): bool { @@ -93,9 +68,6 @@ public function forceDelete(User $user, Response $response): bool /** * Determine whether the user can permanently bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDeleteAny(User $user): bool { @@ -104,10 +76,6 @@ public function forceDeleteAny(User $user): bool /** * Determine whether the user can restore. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Response $response - * @return bool */ public function restore(User $user, Response $response): bool { @@ -116,9 +84,6 @@ public function restore(User $user, Response $response): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function restoreAny(User $user): bool { @@ -127,10 +92,6 @@ public function restoreAny(User $user): bool /** * Determine whether the user can replicate. - * - * @param \App\Models\User $user - * @param \LaraZeus\Bolt\Models\Response $response - * @return bool */ public function replicate(User $user, Response $response): bool { @@ -139,13 +100,9 @@ public function replicate(User $user, Response $response): bool /** * Determine whether the user can reorder. - * - * @param \App\Models\User $user - * @return bool */ public function reorder(User $user): bool { return $user->can('reorder_response'); } - } diff --git a/app/Policies/RolePolicy.php b/app/Policies/RolePolicy.php index 0e73228..4fcda60 100644 --- a/app/Policies/RolePolicy.php +++ b/app/Policies/RolePolicy.php @@ -3,8 +3,8 @@ namespace App\Policies; use App\Models\User; -use Spatie\Permission\Models\Role; use Illuminate\Auth\Access\HandlesAuthorization; +use Spatie\Permission\Models\Role; class RolePolicy { @@ -12,9 +12,6 @@ class RolePolicy /** * Determine whether the user can view any models. - * - * @param \App\Models\User $user - * @return bool */ public function viewAny(User $user): bool { @@ -23,10 +20,6 @@ public function viewAny(User $user): bool /** * Determine whether the user can view the model. - * - * @param \App\Models\User $user - * @param \Spatie\Permission\Models\Role $role - * @return bool */ public function view(User $user, Role $role): bool { @@ -35,9 +28,6 @@ public function view(User $user, Role $role): bool /** * Determine whether the user can create models. - * - * @param \App\Models\User $user - * @return bool */ public function create(User $user): bool { @@ -46,10 +36,6 @@ public function create(User $user): bool /** * Determine whether the user can update the model. - * - * @param \App\Models\User $user - * @param \Spatie\Permission\Models\Role $role - * @return bool */ public function update(User $user, Role $role): bool { @@ -58,10 +44,6 @@ public function update(User $user, Role $role): bool /** * Determine whether the user can delete the model. - * - * @param \App\Models\User $user - * @param \Spatie\Permission\Models\Role $role - * @return bool */ public function delete(User $user, Role $role): bool { @@ -70,9 +52,6 @@ public function delete(User $user, Role $role): bool /** * Determine whether the user can bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function deleteAny(User $user): bool { @@ -81,10 +60,6 @@ public function deleteAny(User $user): bool /** * Determine whether the user can permanently delete. - * - * @param \App\Models\User $user - * @param \Spatie\Permission\Models\Role $role - * @return bool */ public function forceDelete(User $user, Role $role): bool { @@ -93,9 +68,6 @@ public function forceDelete(User $user, Role $role): bool /** * Determine whether the user can permanently bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDeleteAny(User $user): bool { @@ -104,10 +76,6 @@ public function forceDeleteAny(User $user): bool /** * Determine whether the user can restore. - * - * @param \App\Models\User $user - * @param \Spatie\Permission\Models\Role $role - * @return bool */ public function restore(User $user, Role $role): bool { @@ -116,9 +84,6 @@ public function restore(User $user, Role $role): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function restoreAny(User $user): bool { @@ -127,10 +92,6 @@ public function restoreAny(User $user): bool /** * Determine whether the user can replicate. - * - * @param \App\Models\User $user - * @param \Spatie\Permission\Models\Role $role - * @return bool */ public function replicate(User $user, Role $role): bool { @@ -139,13 +100,9 @@ public function replicate(User $user, Role $role): bool /** * Determine whether the user can reorder. - * - * @param \App\Models\User $user - * @return bool */ public function reorder(User $user): bool { return $user->can('{{ Reorder }}'); } - } diff --git a/app/Policies/TagPolicy.php b/app/Policies/TagPolicy.php index 2392d34..16e5396 100644 --- a/app/Policies/TagPolicy.php +++ b/app/Policies/TagPolicy.php @@ -3,8 +3,8 @@ namespace App\Policies; use App\Models\User; -use LaraZeus\Sky\Models\Tag; use Illuminate\Auth\Access\HandlesAuthorization; +use LaraZeus\Sky\Models\Tag; class TagPolicy { @@ -12,9 +12,6 @@ class TagPolicy /** * Determine whether the user can view any models. - * - * @param \App\Models\User $user - * @return bool */ public function viewAny(User $user): bool { @@ -23,10 +20,6 @@ public function viewAny(User $user): bool /** * Determine whether the user can view the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Tag $tag - * @return bool */ public function view(User $user, Tag $tag): bool { @@ -35,9 +28,6 @@ public function view(User $user, Tag $tag): bool /** * Determine whether the user can create models. - * - * @param \App\Models\User $user - * @return bool */ public function create(User $user): bool { @@ -46,10 +36,6 @@ public function create(User $user): bool /** * Determine whether the user can update the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Tag $tag - * @return bool */ public function update(User $user, Tag $tag): bool { @@ -58,10 +44,6 @@ public function update(User $user, Tag $tag): bool /** * Determine whether the user can delete the model. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Tag $tag - * @return bool */ public function delete(User $user, Tag $tag): bool { @@ -70,9 +52,6 @@ public function delete(User $user, Tag $tag): bool /** * Determine whether the user can bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function deleteAny(User $user): bool { @@ -81,10 +60,6 @@ public function deleteAny(User $user): bool /** * Determine whether the user can permanently delete. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Tag $tag - * @return bool */ public function forceDelete(User $user, Tag $tag): bool { @@ -93,9 +68,6 @@ public function forceDelete(User $user, Tag $tag): bool /** * Determine whether the user can permanently bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDeleteAny(User $user): bool { @@ -104,10 +76,6 @@ public function forceDeleteAny(User $user): bool /** * Determine whether the user can restore. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Tag $tag - * @return bool */ public function restore(User $user, Tag $tag): bool { @@ -116,9 +84,6 @@ public function restore(User $user, Tag $tag): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function restoreAny(User $user): bool { @@ -127,10 +92,6 @@ public function restoreAny(User $user): bool /** * Determine whether the user can replicate. - * - * @param \App\Models\User $user - * @param \LaraZeus\Sky\Models\Tag $tag - * @return bool */ public function replicate(User $user, Tag $tag): bool { @@ -139,13 +100,9 @@ public function replicate(User $user, Tag $tag): bool /** * Determine whether the user can reorder. - * - * @param \App\Models\User $user - * @return bool */ public function reorder(User $user): bool { return $user->can('reorder_tag'); } - } diff --git a/app/Policies/UserPolicy.php b/app/Policies/UserPolicy.php index 68e101e..019dc5c 100644 --- a/app/Policies/UserPolicy.php +++ b/app/Policies/UserPolicy.php @@ -3,7 +3,6 @@ namespace App\Policies; use App\Models\User; - use Illuminate\Auth\Access\HandlesAuthorization; class UserPolicy @@ -12,9 +11,6 @@ class UserPolicy /** * Determine whether the user can view any models. - * - * @param \App\Models\User $user - * @return bool */ public function viewAny(User $user): bool { @@ -23,9 +19,6 @@ public function viewAny(User $user): bool /** * Determine whether the user can view the model. - * - * @param \App\Models\User $user - * @return bool */ public function view(User $user): bool { @@ -34,9 +27,6 @@ public function view(User $user): bool /** * Determine whether the user can create models. - * - * @param \App\Models\User $user - * @return bool */ public function create(User $user): bool { @@ -45,9 +35,6 @@ public function create(User $user): bool /** * Determine whether the user can update the model. - * - * @param \App\Models\User $user - * @return bool */ public function update(User $user): bool { @@ -56,9 +43,6 @@ public function update(User $user): bool /** * Determine whether the user can delete the model. - * - * @param \App\Models\User $user - * @return bool */ public function delete(User $user): bool { @@ -67,9 +51,6 @@ public function delete(User $user): bool /** * Determine whether the user can bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function deleteAny(User $user): bool { @@ -78,9 +59,6 @@ public function deleteAny(User $user): bool /** * Determine whether the user can permanently delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDelete(User $user): bool { @@ -89,9 +67,6 @@ public function forceDelete(User $user): bool /** * Determine whether the user can permanently bulk delete. - * - * @param \App\Models\User $user - * @return bool */ public function forceDeleteAny(User $user): bool { @@ -100,9 +75,6 @@ public function forceDeleteAny(User $user): bool /** * Determine whether the user can restore. - * - * @param \App\Models\User $user - * @return bool */ public function restore(User $user): bool { @@ -111,9 +83,6 @@ public function restore(User $user): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function restoreAny(User $user): bool { @@ -122,9 +91,6 @@ public function restoreAny(User $user): bool /** * Determine whether the user can bulk restore. - * - * @param \App\Models\User $user - * @return bool */ public function replicate(User $user): bool { @@ -133,9 +99,6 @@ public function replicate(User $user): bool /** * Determine whether the user can reorder. - * - * @param \App\Models\User $user - * @return bool */ public function reorder(User $user): bool { diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index 40501ac..af824db 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -51,7 +51,7 @@ public function panel(Panel $panel): Panel FilamentNavigation::make(), SpatieLaravelTranslatablePlugin::make() ->defaultLocales([config('app.locale')]), - \BezhanSalleh\FilamentShield\FilamentShieldPlugin::make() + \BezhanSalleh\FilamentShield\FilamentShieldPlugin::make(), ]) ->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources') ->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')