Passed
Push — master ( c6a720...0f9eb8 )
by Jonathan
14:04
created
resources/views/modules/default/detail/tabs.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
             {{-- Badge --}}
32 32
             <?php
33
-                $countMethod = $relatedlist->method . 'Count';
33
+                $countMethod = $relatedlist->method.'Count';
34 34
 
35 35
                 $model = new $relatedModule->model_class;
36 36
                 $count = $model->$countMethod($relatedlist, $record->id);
Please login to merge, or discard this patch.
resources/views/modules/profile/edit/main.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
                                     @foreach (uccello()->getCapabilities() as $capability)
42 42
                                         <?php
43 43
                                             $isApiCapability = strpos($capability->name, 'api-') !== false;
44
-                                            $packagePrefix = $capability->package ? $capability->package . '::' : '';
44
+                                            $packagePrefix = $capability->package ? $capability->package.'::' : '';
45 45
                                         ?>
46 46
                                         <th class="center-align @if ($isApiCapability)for-api hide @endif">{{ trans($packagePrefix . 'capability.' . $capability->name) }}</th>
47 47
                                     @endforeach
Please login to merge, or discard this patch.
resources/views/modules/profile/detail/main.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
                             @foreach (uccello()->getCapabilities() as $capability)
22 22
                                 <?php
23 23
                                     $isApiCapability = strpos($capability->name, 'api-') !== false;
24
-                                    $packagePrefix = $capability->package ? $capability->package . '::' : '';
24
+                                    $packagePrefix = $capability->package ? $capability->package.'::' : '';
25 25
                                 ?>
26 26
                                 <th class="center-align @if ($isApiCapability)for-api hide @endif">{{ trans($packagePrefix . 'capability.' . $capability->name) }}</th>
27 27
                             @endforeach
Please login to merge, or discard this patch.
app/Listeners/Core/AfterSaveEventListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     {
21 21
         if ($event->mode === 'create') {
22 22
             Entity::create([
23
-                'id' => (string) Str::uuid(),
23
+                'id' => (string)Str::uuid(),
24 24
                 'module_id' => $event->module->id,
25 25
                 'record_id' => $event->record->getKey(),
26 26
             ]);
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         parent::boot();
21 21
 
22 22
         // Bind domain
23
-        Route::bind('domain', function ($value) {
23
+        Route::bind('domain', function($value) {
24 24
             if (preg_match('`^[0-9]+$`', $value)) { // By id
25 25
                 $domain = Domain::findOrFail($value);
26 26
             } else { // By slug
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         });
31 31
 
32 32
         // Bind module
33
-        Route::bind('module', function ($value) {
33
+        Route::bind('module', function($value) {
34 34
             if (preg_match('`^[0-9]+$`', $value)) { // By id
35 35
                 $module = Module::findOrFail($value);
36 36
             } else { // By name
Please login to merge, or discard this patch.
app/Http/Controllers/Core/Controller.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * @param Module $module
76 76
      * @param boolean $forBlade
77 77
      */
78
-    protected function preProcess(?Domain &$domain, Module $module, Request $request, $forBlade=true)
78
+    protected function preProcess(?Domain &$domain, Module $module, Request $request, $forBlade = true)
79 79
     {
80 80
         // If we don't use multi domains, find the first one
81 81
         if (!uccello()->useMultiDomains()) {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     {
158 158
         $keyName = $getAdminModules ? 'modules_all' : 'modules_not_admin';
159 159
 
160
-        return Cache::rememberForever($keyName, function () use($getAdminModules) {
160
+        return Cache::rememberForever($keyName, function() use($getAdminModules) {
161 161
             $modules = [ ];
162 162
 
163 163
             $allModules = Module::all();
@@ -215,11 +215,11 @@  discard block
 block discarded – undo
215 215
      */
216 216
     protected function getDomainsTreeHtml()
217 217
     {
218
-        return Cache::remember('users', 600, function () { // 10 minutes
218
+        return Cache::remember('users', 600, function() { // 10 minutes
219 219
             $domainsTreeHtml = '<ul class="tree tree-level-0">';
220 220
 
221 221
             $rootDomains = app('uccello')->getRootDomains();
222
-            foreach($rootDomains as $root) {
222
+            foreach ($rootDomains as $root) {
223 223
 
224 224
                 $descendants = $root->findDescendants()->get();
225 225
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 
228 228
                 $html = $tree->render(
229 229
                     'ul',
230
-                    function ($node) {
230
+                    function($node) {
231 231
                         if (auth()->user()->hasRoleOnDomain($node)) {
232 232
                             $currentClass = '';
233 233
                             // if ($node->id === $this->domain->id) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -234,8 +234,7 @@
 block discarded – undo
234 234
                             //     $currentClass = 'class="green-text"';
235 235
                             // }
236 236
                             return '<li><a href="'.ucroute('uccello.home', $node).'" '.$currentClass.'>'.$node->name.'</a>{sub-tree}</li>';
237
-                        }
238
-                        elseif (auth()->user()->hasRoleOnDescendantDomain($node)) {
237
+                        } elseif (auth()->user()->hasRoleOnDescendantDomain($node)) {
239 238
                             return '<li>'.$node->name.'{sub-tree}</li>';
240 239
                         } else {
241 240
                             return '';
Please login to merge, or discard this patch.
tests/Feature/Settings/ModuleManagerTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
     protected function getSettingsModule()
29 29
     {
30
-       return Module::where('name', 'settings')->first();
30
+        return Module::where('name', 'settings')->first();
31 31
     }
32 32
 
33 33
     public function testModuleActivationCanBeChanged()
Please login to merge, or discard this patch.
app/Http/Controllers/User/AccountController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
         });
53 53
 
54 54
         $validator = Validator::make(request()->all(), [
55
-            'username' => $rules['username'],
56
-            'name' => $rules['name'],
57
-            'email' => $rules['email'],
55
+            'username' => $rules[ 'username' ],
56
+            'name' => $rules[ 'name' ],
57
+            'email' => $rules[ 'email' ],
58 58
         ]);
59 59
 
60 60
         if ($validator->fails()) {
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
         if (request('avatar')) {
94 94
             $image = str_replace('data:image/png;base64,', '', request('avatar'));
95 95
             $image = str_replace(' ', '+', $image);
96
-            $imageName = 'user-' . $user->id . '.png';
96
+            $imageName = 'user-'.$user->id.'.png';
97 97
             $path = storage_path('app/public/avatar/');
98
-            $filepath = $path . $imageName;
98
+            $filepath = $path.$imageName;
99 99
 
100
-            if(!\File::isDirectory($path)){
100
+            if (!\File::isDirectory($path)) {
101 101
                 \File::makeDirectory($path, 0777, true, true);
102 102
             }
103 103
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
         $field = Field::where('module_id', ucmodule('user')->id)->where('name', 'password')->first();
130 130
         $password_rules = isset($field->data->rules) ? explode('|', $field->data->rules) : '';
131
-        $password_rules[] = 'confirmed';
131
+        $password_rules[ ] = 'confirmed';
132 132
 
133 133
         $validator = Validator::make(request()->all(), [
134 134
             'current_password' => function($attribute, $value, $fail) use ($user) {
Please login to merge, or discard this patch.
app/Http/Controllers/Core/ListController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             ->get();
52 52
 
53 53
         // Order by
54
-        $filterOrderBy = (array) $selectedFilter->order_by;
54
+        $filterOrderBy = (array)$selectedFilter->order_by;
55 55
 
56 56
         return $this->autoView(compact('datatableColumns', 'filters', 'selectedFilter', 'filterOrderBy'));
57 57
     }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             if ($relatedList && $relatedList->method) {
116 116
                 // Related list method
117 117
                 $method = $relatedList->method;
118
-                $recordIdsMethod = $method . 'RecordIds';
118
+                $recordIdsMethod = $method.'RecordIds';
119 119
 
120 120
                 // Get related records ids
121 121
                 $model = new $modelClass;
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
                 // Add the record id itself to be filtered
125 125
                 if ($relatedList->module_id === $relatedList->related_module_id && !empty($recordId) && !$filteredRecordIds->contains($recordId)) {
126
-                    $filteredRecordIds[] = (int)$recordId;
126
+                    $filteredRecordIds[ ] = (int)$recordId;
127 127
                 }
128 128
 
129 129
                 // Make the quer
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             $records = $query->paginate($length);
135 135
         }
136 136
 
137
-        $records->getCollection()->transform(function ($record) use ($domain, $module) {
137
+        $records->getCollection()->transform(function($record) use ($domain, $module) {
138 138
             foreach ($module->fields as $field) {
139 139
                 // If a special template exists, use it. Else use the generic template
140 140
                 $uitype = uitype($field->uitype_id);
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         $results = collect();
175 175
         if (method_exists($modelClass, 'getSearchResult') && property_exists($modelClass, 'searchableColumns')) {
176 176
             $searchResults = new Search();
177
-            $searchResults->registerModel($modelClass, (array) (new $modelClass)->searchableColumns);
177
+            $searchResults->registerModel($modelClass, (array)(new $modelClass)->searchableColumns);
178 178
             $results = $searchResults->search($q)->take(config('uccello.max_results.autocomplete', 10));
179 179
         }
180 180
 
@@ -195,9 +195,9 @@  discard block
 block discarded – undo
195 195
         $savePageLength = $request->input('save_page_length');
196 196
 
197 197
         // Optional data
198
-        $data = [];
198
+        $data = [ ];
199 199
         if ($savePageLength) {
200
-            $data["length"] = $request->input('page_length');
200
+            $data[ "length" ] = $request->input('page_length');
201 201
         }
202 202
 
203 203
         $filter = Filter::firstOrNew([
Please login to merge, or discard this patch.