@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | //funció creada per veure si el rol ja te assignat un permís, si el te no fem res, sino li assignem. |
9 | 9 | // si no es fa així provoca error: |
10 | 10 | //Illuminate\Database\QueryException with message 'SQLSTATE[23000]: Integrity constraint violation: 19 UNIQUE constraint failed: role_has_permissions.permission_id, role_has_permissions.role_id (SQL: insert into "role_has_permissions" ("permission_id", "role_id") values (1, 1))' |
11 | -if (!function_exists('assignPermission')) { |
|
11 | +if ( ! function_exists('assignPermission')) { |
|
12 | 12 | |
13 | 13 | /** |
14 | 14 | * @param $role |
@@ -16,13 +16,13 @@ discard block |
||
16 | 16 | */ |
17 | 17 | function assignPermission($role, $permission) |
18 | 18 | { |
19 | - if (!$role->hasPermissionTo($permission)) { |
|
19 | + if ( ! $role->hasPermissionTo($permission)) { |
|
20 | 20 | $role->givePermissionTo($permission); |
21 | 21 | } |
22 | 22 | } |
23 | 23 | } |
24 | 24 | |
25 | -if (!function_exists('initialize_task_permissions')) { |
|
25 | +if ( ! function_exists('initialize_task_permissions')) { |
|
26 | 26 | function initialize_task_permissions() |
27 | 27 | { |
28 | 28 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | } |
58 | 58 | } |
59 | 59 | |
60 | -if (!function_exists('create_user')) { |
|
60 | +if ( ! function_exists('create_user')) { |
|
61 | 61 | function create_user() |
62 | 62 | { |
63 | 63 | factory(User::class)->create([ |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | } |
77 | 77 | } |
78 | 78 | |
79 | -if (!function_exists('first_user_as_task_manager')) { |
|
79 | +if ( ! function_exists('first_user_as_task_manager')) { |
|
80 | 80 | function first_user_as_task_manager() |
81 | 81 | { |
82 | 82 |