Passed
Push — master ( 7cf7c0...bd3fb1 )
by Jonathan
18:31
created
app/Models/Role.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         parent::boot();
53 53
 
54 54
         // Linck to parent record
55
-        static::created(function ($model) {
55
+        static::created(function($model) {
56 56
             static::linkToParentRecord($model);
57 57
         });
58 58
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         //     static::linkToParentRecord($model);
61 61
         // });
62 62
 
63
-        static::updated(function ($model) {
63
+        static::updated(function($model) {
64 64
             static::linkToParentRecord($model);
65 65
         });
66 66
     }
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     public function isRoot()
88 88
     {
89 89
         // return (empty($this->{$this->getTreeColumn('parent')})) ? true : false;
90
-        return $this->{$this->getTreeColumn('path')} === $this->getKey() . '/'
90
+        return $this->{$this->getTreeColumn('path')} === $this->getKey().'/'
91 91
                 && $this->{$this->getTreeColumn('level')} === 0;
92 92
     }
93 93
 
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
@@ -25,11 +25,11 @@
 block discarded – undo
25 25
         'creator_id',
26 26
     ];
27 27
 
28
-    protected $primaryKey = 'id';   // TODO: Change to "uid" to make joins withs modules tables possible ???
28
+    protected $primaryKey = 'id'; // TODO: Change to "uid" to make joins withs modules tables possible ???
29 29
     public $incrementing = false;
30 30
 
31 31
     // Allow Eloquent to return id as string instead of int.
32
-    protected $casts = ['id' => 'string'];
32
+    protected $casts = [ 'id' => 'string' ];
33 33
 
34 34
     protected function initTablePrefix()
35 35
     {
Please login to merge, or discard this patch.
app/Fields/Uitype/Choice.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     public function getFormattedValueToDisplay(Field $field, $record) : string
76 76
     {
77 77
         if (isset($field->data->multiple) && $field->data->multiple === true && !empty($record->{$field->column})) {
78
-            $values = [];
78
+            $values = [ ];
79 79
 
80 80
             $fieldValues = json_decode($record->{$field->column});
81 81
             if (is_array($fieldValues)) {
@@ -84,13 +84,13 @@  discard block
 block discarded – undo
84 84
                         continue;
85 85
                     }
86 86
 
87
-                    $values[] =  uctrans($value, $field->module);
87
+                    $values[ ] = uctrans($value, $field->module);
88 88
                 }
89 89
             }
90 90
 
91 91
             $value = implode(', ', $values);
92 92
         } else {
93
-            $value =  parent::getFormattedValueToDisplay($field, $record);
93
+            $value = parent::getFormattedValueToDisplay($field, $record);
94 94
         }
95 95
 
96 96
         return $value;
Please login to merge, or discard this patch.
app/Http/Controllers/Core/TreeController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
         $roots = collect();
61 61
         foreach ($rootRecords as $record) {
62
-            $roots[] = $this->getFormattedRecordToAdd($record);
62
+            $roots[ ] = $this->getFormattedRecordToAdd($record);
63 63
         }
64 64
 
65 65
         return $roots;
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $children = collect();
86 86
         if ($parentRecord) {
87 87
             foreach ($parentRecord->children()->get() as $record) {
88
-                $children[] = $this->getFormattedRecordToAdd($record);
88
+                $children[ ] = $this->getFormattedRecordToAdd($record);
89 89
             }
90 90
         }
91 91
 
Please login to merge, or discard this patch.
resources/views/modules/default/uitypes/edit/file.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     @if ($value)
17 17
         <?php
18 18
             $valueParts = explode(';', $value);
19
-            $fileName = $valueParts[0];
19
+            $fileName = $valueParts[ 0 ];
20 20
         ?>
21 21
         <div class="input-field current-file">
22 22
             <div class="file-container">
Please login to merge, or discard this patch.
app/Support/Traits/WithRoles.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/Module.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -176,8 +176,8 @@
 block discarded – undo
176 176
             }
177 177
             // Several routes
178 178
             elseif (is_array($this->data->menu)) {
179
-                if (!empty($this->data->menu[0]->route)) {
180
-                    $defaultRoute = $this->data->menu[0]->route;
179
+                if (!empty($this->data->menu[ 0 ]->route)) {
180
+                    $defaultRoute = $this->data->menu[ 0 ]->route;
181 181
                 }
182 182
             }
183 183
         }
Please login to merge, or discard this patch.
app/Support/Scopes/AssignedUser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
             $builder->whereIn($model->getTable().'.assigned_user_id', $user->getAllowedGroupUuids());
28 28
 
29 29
             // Records assigned to an user with roles subordonate to the roles of the user
30
-            $builder->orWhereIn($model->getTable().'.assigned_user_id', function ($query) use ($user) {
30
+            $builder->orWhereIn($model->getTable().'.assigned_user_id', function($query) use ($user) {
31 31
                 $entityTable = with(new Entity)->getTable();
32 32
                 $privilegesTable = env('UCCELLO_TABLE_PREFIX', 'uccello_').'privileges';
33 33
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
                 $query->select($entityTable.'.id')
38 38
                     ->from($entityTable)
39
-                    ->join($privilegesTable, function ($join) use($entityTable, $privilegesTable, $subordonateRolesIds) {
39
+                    ->join($privilegesTable, function($join) use($entityTable, $privilegesTable, $subordonateRolesIds) {
40 40
                         $join->on("$privilegesTable.user_id", '=', $entityTable.'.record_id')
41 41
                         ->whereIn("$privilegesTable.role_id", $subordonateRolesIds);
42 42
                     })
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
             // Records created by the user
47 47
             if (!empty($model->module)) {
48
-                $builder->orWhereIn($model->getTable().'.'.$model->getKeyName(), function ($query) use($model) {
48
+                $builder->orWhereIn($model->getTable().'.'.$model->getKeyName(), function($query) use($model) {
49 49
                     $query->select('record_id')
50 50
                     ->from(with(new Entity)->getTable())
51 51
                     ->where('module_id', $model->module->id ?? null)
Please login to merge, or discard this patch.
app/Http/Controllers/Core/PopupEditController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,9 +74,9 @@
 block discarded – undo
74 74
             }
75 75
         }
76 76
         // Redirect if form not valid
77
-        if (! $form->isValid()) {
77
+        if (!$form->isValid()) {
78 78
             ucnotify(uctrans('notification.form.not_valid', $module), 'error');
79
-            $response = redirect(route('uccello.popup.edit', ['domain' => $domain->slug, 'module' => $module->name]));
79
+            $response = redirect(route('uccello.popup.edit', [ 'domain' => $domain->slug, 'module' => $module->name ]));
80 80
             $response = $response->withErrors($form->getErrors(), $form->getErrorBag())->withInput();
81 81
             return $response;
82 82
         }
Please login to merge, or discard this patch.