@@ -44,7 +44,7 @@ |
||
44 | 44 | foreach ($treeDomainsIds as $treeDomainId) { |
45 | 45 | $_domain = Domain::find($treeDomainId); |
46 | 46 | foreach ($_domain->roles as $role) { |
47 | - $roleName = $_domain->id === $domain->id ? $role->name : $_domain->name . ' > ' . $role->name; |
|
47 | + $roleName = $_domain->id === $domain->id ? $role->name : $_domain->name.' > '.$role->name; |
|
48 | 48 | $roles[ $role->id ] = $roleName; |
49 | 49 | } |
50 | 50 | } |
@@ -154,7 +154,7 @@ |
||
154 | 154 | |
155 | 155 | // Add tab id if defined |
156 | 156 | if ($this->tab_id) { |
157 | - $params['tab'] = $this->tab_id; |
|
157 | + $params[ 'tab' ] = $this->tab_id; |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | return ucroute('uccello.edit.relation.delete', $domain, $this->relatedModule, $params); |
@@ -60,17 +60,17 @@ |
||
60 | 60 | |
61 | 61 | public function parentGroups() |
62 | 62 | { |
63 | - return $this->belongsToMany(self::class, $this->tablePrefix . 'rl_groups_groups', 'children_id', 'parent_id'); |
|
63 | + return $this->belongsToMany(self::class, $this->tablePrefix.'rl_groups_groups', 'children_id', 'parent_id'); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | public function childrenGroups() |
67 | 67 | { |
68 | - return $this->belongsToMany(self::class, $this->tablePrefix . 'rl_groups_groups', 'parent_id', 'children_id'); |
|
68 | + return $this->belongsToMany(self::class, $this->tablePrefix.'rl_groups_groups', 'parent_id', 'children_id'); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | public function users() |
72 | 72 | { |
73 | - return $this->belongsToMany(User::class, $this->tablePrefix . 'rl_groups_users'); |
|
73 | + return $this->belongsToMany(User::class, $this->tablePrefix.'rl_groups_users'); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -24,11 +24,11 @@ |
||
24 | 24 | 'record_id', |
25 | 25 | ]; |
26 | 26 | |
27 | - protected $primaryKey = 'id'; // TODO: Change to "uid" to make joins withs modules tables possible ??? |
|
27 | + protected $primaryKey = 'id'; // TODO: Change to "uid" to make joins withs modules tables possible ??? |
|
28 | 28 | public $incrementing = false; |
29 | 29 | |
30 | 30 | // Allow Eloquent to return id as string instead of int. |
31 | - protected $casts = ['id' => 'string']; |
|
31 | + protected $casts = [ 'id' => 'string' ]; |
|
32 | 32 | |
33 | 33 | protected function initTablePrefix() |
34 | 34 | { |
@@ -274,15 +274,15 @@ |
||
274 | 274 | |
275 | 275 | // Redirect to source record if a relation was deleted |
276 | 276 | if (isset($relatedlist) && $request->input('id')) { |
277 | - $params = ['id' => $request->input('id')]; |
|
277 | + $params = [ 'id' => $request->input('id') ]; |
|
278 | 278 | |
279 | 279 | // Add tab id if defined to select it automaticaly |
280 | 280 | if ($request->input('tab')) { |
281 | - $params['tab'] = $request->input('tab'); |
|
281 | + $params[ 'tab' ] = $request->input('tab'); |
|
282 | 282 | } |
283 | 283 | // Add related list id to select the related tab automaticaly |
284 | 284 | else { |
285 | - $params['relatedlist'] = $relatedlist->id; |
|
285 | + $params[ 'relatedlist' ] = $relatedlist->id; |
|
286 | 286 | } |
287 | 287 | |
288 | 288 | $route = ucroute('uccello.detail', $domain, $relatedlist->module, $params); |
@@ -3,9 +3,9 @@ |
||
3 | 3 | <?php |
4 | 4 | $autocompleteSearch = false; |
5 | 5 | |
6 | - $entities = []; |
|
6 | + $entities = [ ]; |
|
7 | 7 | |
8 | - if (isset($column['data']->autocomplete_search) && $column['data']->autocomplete_search === true) { |
|
8 | + if (isset($column[ 'data' ]->autocomplete_search) && $column[ 'data' ]->autocomplete_search === true) { |
|
9 | 9 | $autocompleteSearch = true; |
10 | 10 | } else { |
11 | 11 | $entities = auth()->user()->getAllowedGroupsAndUsers(false); |
@@ -63,7 +63,7 @@ |
||
63 | 63 | |
64 | 64 | // Create uuid |
65 | 65 | Entity::create([ |
66 | - 'id' => (string) Str::uuid(), |
|
66 | + 'id' => (string)Str::uuid(), |
|
67 | 67 | 'module_id' => ucmodule('user')->id, |
68 | 68 | 'record_id' => $user->getKey(), |
69 | 69 | ]); |
@@ -109,8 +109,8 @@ |
||
109 | 109 | */ |
110 | 110 | public function addConditionToSearchQuery(Builder $query, Field $field, $value) : Builder |
111 | 111 | { |
112 | - $query->where(function ($query) use($field, $value) { |
|
113 | - foreach ((array) $value as $_value) { |
|
112 | + $query->where(function($query) use($field, $value) { |
|
113 | + foreach ((array)$value as $_value) { |
|
114 | 114 | // Replace me by connected user's id |
115 | 115 | if ($_value === 'me') { |
116 | 116 | $_value = Auth::user()->uuid; |
@@ -123,7 +123,7 @@ |
||
123 | 123 | protected function isEmptyOrNotEmptySearchQuery(Builder &$query, Field $field, $value): bool |
124 | 124 | { |
125 | 125 | if ($value == uctrans('filter.search_flag.empty', $field->module)) { |
126 | - $query->where(function ($q) use ($field) { |
|
126 | + $query->where(function($q) use ($field) { |
|
127 | 127 | $q->whereNull($field->column) |
128 | 128 | ->orWhere($field->column, '=', ''); |
129 | 129 | }); |