From 0adbb20ca789c166a8327726cd030ba942f5da12 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Thu, 10 Aug 2023 08:03:03 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Models/Permission.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/Permission.php b/src/Models/Permission.php index 5f5dd311..16bfab6e 100644 --- a/src/Models/Permission.php +++ b/src/Models/Permission.php @@ -26,7 +26,7 @@ public function __construct(array $attributes = []) public static function generateFor($table_name, $is_maintenance = false) { - if (!Permission::where('table_name', $table_name)->first()) { + if (! Permission::where('table_name', $table_name)->first()) { $permissions = []; $permissions[] = self::firstOrCreate(['key' => 'browse_'.$table_name, 'description' => 'Browse '.$table_name, 'table_name' => $table_name, 'roles_can_see_all_data' => '["administrator"]', 'field_identify_related_user' => 'user_id']); $permissions[] = self::firstOrCreate(['key' => 'read_'.$table_name, 'description' => 'Read '.$table_name, 'table_name' => $table_name, 'roles_can_see_all_data' => '["administrator"]', 'field_identify_related_user' => 'user_id']); @@ -104,7 +104,7 @@ public static function generateForTableCRUD() foreach ($get_all_table_name as $key => $table) { $permission_table_name = Permission::where('table_name', $table->name)->get(); foreach ($permission_table_name as $key => $table_name) { - if ($table->roles_can_see_all_data == NULL && $table_name->field_identify_related_user == NULL) { + if ($table->roles_can_see_all_data == null && $table_name->field_identify_related_user == null) { $table_name->roles_can_see_all_data = '["administrator"]'; $table_name->field_identify_related_user = 'user_id'; $table_name->save();