Completed
Push — master ( 9c5f22...63c4b4 )
by Jonathan
13:12
created
app/Fields/Uitype/Checkbox.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,8 +87,8 @@
 block discarded – undo
87 87
      */
88 88
     public function addConditionToSearchQuery(Builder $query, Field $field, $value) : Builder
89 89
     {
90
-        $query->where(function ($query) use($field, $value) {
91
-            foreach ((array) $value as $_value) {
90
+        $query->where(function($query) use($field, $value) {
91
+            foreach ((array)$value as $_value) {
92 92
                 $formattedValue = $this->getFormattedValueToSearch($_value);
93 93
                 $query = $query->orWhere($field->column, $formattedValue);
94 94
             }
Please login to merge, or discard this patch.
app/Forms/Form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         }
33 33
 
34 34
         // If the form is not valid display a notification
35
-        if (! $this->isValid()) {
35
+        if (!$this->isValid()) {
36 36
             ucnotify(uctrans('notification.form.not_valid', $module), 'error');
37 37
         }
38 38
 
Please login to merge, or discard this patch.
app/Http/Controllers/Core/Controller.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         $domainsTreeHtml = '<ul class="tree tree-level-0">';
210 210
 
211 211
         $rootDomains = app('uccello')->getRootDomains();
212
-        foreach($rootDomains as $root) {
212
+        foreach ($rootDomains as $root) {
213 213
 
214 214
             $descendants = $root->findDescendants()->get();
215 215
 
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 
218 218
             $html = $tree->render(
219 219
                 'ul',
220
-                function ($node) {
220
+                function($node) {
221 221
                     if (auth()->user()->hasRoleOnDomain($node)) {
222 222
                         $currentClass = '';
223 223
                         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
@@ -224,8 +224,7 @@
 block discarded – undo
224 224
                             $currentClass = 'class="green-text"';
225 225
                         }
226 226
                         return '<li><a href="'.ucroute('uccello.home', $node).'" '.$currentClass.'>'.$node->name.'</a>{sub-tree}</li>';
227
-                    }
228
-                    elseif (auth()->user()->hasRoleOnDescendantDomain($node)) {
227
+                    } elseif (auth()->user()->hasRoleOnDescendantDomain($node)) {
229 228
                         return '<li>'.$node->name.'{sub-tree}</li>';
230 229
                     } else {
231 230
                         return '';
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         $this->registerTranslations();
28 28
         $this->registerPublishing();
29 29
 
30
-        $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'uccello');
30
+        $this->loadViewsFrom(__DIR__.'/../../resources/views', 'uccello');
31 31
     }
32 32
 
33 33
     /**
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     private function registerMigrations()
39 39
     {
40 40
         if ($this->app->runningInConsole()) {
41
-            $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
41
+            $this->loadMigrationsFrom(__DIR__.'/../../database/migrations');
42 42
         }
43 43
     }
44 44
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     private function registerTranslations()
51 51
     {
52
-        $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'uccello');
52
+        $this->loadTranslationsFrom(__DIR__.'/../../resources/lang', 'uccello');
53 53
     }
54 54
 
55 55
     /**
@@ -62,18 +62,18 @@  discard block
 block discarded – undo
62 62
         if ($this->app->runningInConsole()) {
63 63
             // Publish assets
64 64
             $this->publishes([
65
-                __DIR__ . '/../../public' => public_path('vendor/uccello/uccello'),
66
-                __DIR__ . '/../../public/images/vendor' => public_path('images/vendor')
65
+                __DIR__.'/../../public' => public_path('vendor/uccello/uccello'),
66
+                __DIR__.'/../../public/images/vendor' => public_path('images/vendor')
67 67
             ], 'uccello-assets');
68 68
 
69 69
             // Config
70 70
             $this->publishes([
71
-                __DIR__ . '/../../config/uccello.php' => config_path('uccello.php'),
71
+                __DIR__.'/../../config/uccello.php' => config_path('uccello.php'),
72 72
             ], 'uccello-config');
73 73
 
74 74
             // Views
75 75
             $this->publishes([
76
-                __DIR__ . '/../../resources/views' => resource_path('views/vendor/uccello')
76
+                __DIR__.'/../../resources/views' => resource_path('views/vendor/uccello')
77 77
             ], 'uccello-views');
78 78
         }
79 79
     }
@@ -98,12 +98,12 @@  discard block
 block discarded – undo
98 98
     {
99 99
         // Config
100 100
         $this->mergeConfigFrom(
101
-            __DIR__ . '/../../config/uccello.php',
101
+            __DIR__.'/../../config/uccello.php',
102 102
             'uccello'
103 103
         );
104 104
 
105 105
         // Helper
106
-        App::bind('uccello', function () {
106
+        App::bind('uccello', function() {
107 107
             return new \Uccello\Core\Helpers\Uccello;
108 108
         });
109 109
 
Please login to merge, or discard this patch.
app/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
      * @param mixed $message
84 84
      * @return void
85 85
      */
86
-    function uclog($message, $type='info')
86
+    function uclog($message, $type = 'info')
87 87
     {
88 88
         Log::$type($message);
89 89
     }
Please login to merge, or discard this patch.
app/Console/Commands/InstallCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,13 +55,13 @@
 block discarded – undo
55 55
     public function handle()
56 56
     {
57 57
         $this->comment('Executing make:auth...');
58
-        $this->callSilent('make:auth', ['--force' => true]);
58
+        $this->callSilent('make:auth', [ '--force' => true ]);
59 59
 
60 60
         $this->comment('Publishing Uccello Assets...');
61
-        $this->callSilent('vendor:publish', ['--tag' => 'uccello-assets']);
61
+        $this->callSilent('vendor:publish', [ '--tag' => 'uccello-assets' ]);
62 62
 
63 63
         $this->comment('Publishing Uccello Configuration...');
64
-        $this->callSilent('vendor:publish', ['--tag' => 'uccello-config']);
64
+        $this->callSilent('vendor:publish', [ '--tag' => 'uccello-config' ]);
65 65
 
66 66
 
67 67
         $this->comment('Copying User Model...');
Please login to merge, or discard this patch.
app/Http/Controllers/Core/ListController.php 1 patch
Spacing   +6 added lines, -6 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
     }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             if ($relatedList && $relatedList->method) {
145 145
                 // Related list method
146 146
                 $method = $relatedList->method;
147
-                $recordIdsMethod = $method . 'RecordIds';
147
+                $recordIdsMethod = $method.'RecordIds';
148 148
 
149 149
                 // Get related records ids
150 150
                 $model = new $modelClass;
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 
153 153
                 // Add the record id itself to be filtered
154 154
                 if ($relatedList->related_module_id === $module->id && !empty($recordId) && !$filteredRecordIds->contains($recordId)) {
155
-                    $filteredRecordIds[] = (int)$recordId;
155
+                    $filteredRecordIds[ ] = (int)$recordId;
156 156
                 }
157 157
 
158 158
                 // Make the quer
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
             $records = $query->paginate($length);
164 164
         }
165 165
 
166
-        $records->getCollection()->transform(function ($record) use ($domain, $module) {
166
+        $records->getCollection()->transform(function($record) use ($domain, $module) {
167 167
             foreach ($module->fields as $field) {
168 168
                 // If a special template exists, use it. Else use the generic template
169 169
                 $uitypeViewName = sprintf('uitypes.list.%s', $field->uitype->name);
@@ -224,9 +224,9 @@  discard block
 block discarded – undo
224 224
         $savePageLength = $request->input('save_page_length');
225 225
 
226 226
         // Optional data
227
-        $data = [];
227
+        $data = [ ];
228 228
         if ($savePageLength) {
229
-            $data["length"] = $request->input('page_length');
229
+            $data[ "length" ] = $request->input('page_length');
230 230
         }
231 231
 
232 232
         $filter = Filter::firstOrNew([
Please login to merge, or discard this patch.
resources/views/modules/default/uitypes/list/file.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 $value = $field->uitype->getFormattedValueToDisplay($field, $record);
3 3
 $valueParts = explode(';', $value);
4
-$fileName = $valueParts[0];
4
+$fileName = $valueParts[ 0 ];
5 5
 ?>
6 6
 @if (count($valueParts) === 2)
7 7
 <a href="{{ ucroute('uccello.download', $domain, $module, [ 'id' => $record->getKey(), 'field' => $field->column ]) }}"
Please login to merge, or discard this patch.
app/Fields/Uitype/AssignedUser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,8 +120,8 @@
 block discarded – undo
120 120
      */
121 121
     public function addConditionToSearchQuery(Builder $query, Field $field, $value) : Builder
122 122
     {
123
-        $query->where(function ($query) use($field, $value) {
124
-            foreach ((array) $value as $_value) {
123
+        $query->where(function($query) use($field, $value) {
124
+            foreach ((array)$value as $_value) {
125 125
                 // Replace me by connected user's id
126 126
                 if ($_value === 'me') {
127 127
                     $_value = auth()->id();
Please login to merge, or discard this patch.