Passed
Push — master ( 91bafd...525ba8 )
by Jonathan
11:06
created
app/Widgets/RelatedlistWidget.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,19 +20,19 @@
 block discarded – undo
20 20
     public function run()
21 21
     {
22 22
         // Get module
23
-        $module = ucmodule($this->config['module']);
23
+        $module = ucmodule($this->config[ 'module' ]);
24 24
 
25 25
         // Get record
26 26
         $modelClass = $module->model_class;
27
-        $record = $modelClass::find($this->config['record_id']);
27
+        $record = $modelClass::find($this->config[ 'record_id' ]);
28 28
 
29 29
         return view('uccello::widgets.relatedlist', [
30 30
             'config' => $this->config,
31
-            'domain' => ucdomain($this->config['domain']),
31
+            'domain' => ucdomain($this->config[ 'domain' ]),
32 32
             'module' => $module,
33
-            'data' => (object) $this->config['data'],
33
+            'data' => (object)$this->config[ 'data' ],
34 34
             'record' => $record,
35
-            'label' => $this->config['data']->label ?? $this->config['labelForTranslation'],
35
+            'label' => $this->config[ 'data' ]->label ?? $this->config[ 'labelForTranslation' ],
36 36
         ]);
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
database/migrations/2018_04_15_000028_add_default_data.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         ]);
47 47
 
48 48
         Entity::create([
49
-            'id' => (string) Str::uuid(),
49
+            'id' => (string)Str::uuid(),
50 50
             'module_id' => ucmodule('domain')->id,
51 51
             'record_id' => $domain->getKey(),
52 52
         ]);
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         ]);
62 62
 
63 63
         Entity::create([
64
-            'id' => (string) Str::uuid(),
64
+            'id' => (string)Str::uuid(),
65 65
             'module_id' => ucmodule('profile')->id,
66 66
             'record_id' => $profile->getKey(),
67 67
         ]);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $role->profiles()->attach($profile);
92 92
 
93 93
         Entity::create([
94
-            'id' => (string) Str::uuid(),
94
+            'id' => (string)Str::uuid(),
95 95
             'module_id' => ucmodule('role')->id,
96 96
             'record_id' => $role->getKey(),
97 97
         ]);
Please login to merge, or discard this patch.
database/migrations/2018_04_15_000031_alter_role_module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
             'uitype_id' => uitype('boolean')->id,
34 34
             'displaytype_id' => displaytype('everywhere')->id,
35 35
             'sequence' => 3,
36
-            'data' => [ 'info' => 'field_info.see_descendants_records']
36
+            'data' => [ 'info' => 'field_info.see_descendants_records' ]
37 37
         ]);
38 38
 
39 39
         $filter = Filter::where('module_id', $roleModule->id)->where('name', 'filter.all')->first();
Please login to merge, or discard this patch.
app/Http/Controllers/User/EditController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
app/Models/Relatedlist.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
app/Models/Group.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,17 +60,17 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
app/Models/Entity.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
app/Support/Traits/UccelloModule.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     {
20 20
         parent::boot();
21 21
 
22
-        if(static::isFilteredByUser())
22
+        if (static::isFilteredByUser())
23 23
         {
24 24
             static::addGlobalScope(new AssignedUser);
25 25
         }
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $user = Auth::user();
31 31
 
32
-        if($user && !$user->is_admin)
32
+        if ($user && !$user->is_admin)
33 33
         {
34 34
             $module = static::getModuleFromClass(static::class);
35 35
             
36
-            if($module && $module->data && property_exists($module->data, 'private') &&  $module->data->private)
36
+            if ($module && $module->data && property_exists($module->data, 'private') && $module->data->private)
37 37
             {
38 38
                 return true;
39 39
             }
@@ -54,15 +54,15 @@  discard block
 block discarded – undo
54 54
 
55 55
     protected static function getModuleFromClass($className)
56 56
     {
57
-        $modules = Cache::rememberForever('modules_by_model_class', function () {
57
+        $modules = Cache::rememberForever('modules_by_model_class', function() {
58 58
             $modulesGroupedByModelClass = collect();
59
-            Module::all()->map(function ($item) use ($modulesGroupedByModelClass) {
60
-                $modulesGroupedByModelClass[$item->model_class] = $item;
59
+            Module::all()->map(function($item) use ($modulesGroupedByModelClass) {
60
+                $modulesGroupedByModelClass[ $item->model_class ] = $item;
61 61
                 return $modulesGroupedByModelClass;
62 62
             });
63 63
             return $modulesGroupedByModelClass;
64 64
         });
65
-        return $modules[(string) $className] ?? null;
65
+        return $modules[ (string)$className ] ?? null;
66 66
     }
67 67
 
68 68
     public function getUidAttribute()
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
                         ->where('record_id', $this->getKey())
74 74
                         ->first();
75 75
 
76
-        if($entity)
76
+        if ($entity)
77 77
         {
78 78
             $uid = $entity->getKey();
79 79
         }
Please login to merge, or discard this patch.
app/Http/Controllers/Core/EditController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -274,15 +274,15 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.