@@ -27,27 +27,27 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | // Config |
| 29 | 29 | $this->publishes([ |
| 30 | - __DIR__ . '/../../config/uccello.php' => config_path('uccello.php'), |
|
| 30 | + __DIR__.'/../../config/uccello.php' => config_path('uccello.php'), |
|
| 31 | 31 | ], 'config'); |
| 32 | 32 | |
| 33 | 33 | // Views |
| 34 | - $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'uccello'); |
|
| 34 | + $this->loadViewsFrom(__DIR__.'/../../resources/views', 'uccello'); |
|
| 35 | 35 | $this->publishes([ |
| 36 | - __DIR__ . '/../../resources/views' => resource_path('views/vendor/uccello') |
|
| 36 | + __DIR__.'/../../resources/views' => resource_path('views/vendor/uccello') |
|
| 37 | 37 | ], 'views'); |
| 38 | 38 | |
| 39 | 39 | // Publish assets |
| 40 | 40 | $this->publishes([ |
| 41 | - __DIR__ . '/../../public' => public_path('vendor/uccello/uccello'), |
|
| 42 | - __DIR__ . '/../../public/fonts/vendor' => public_path('fonts/vendor'), |
|
| 43 | - __DIR__ . '/../../public/images/vendor' => public_path('images/vendor') |
|
| 41 | + __DIR__.'/../../public' => public_path('vendor/uccello/uccello'), |
|
| 42 | + __DIR__.'/../../public/fonts/vendor' => public_path('fonts/vendor'), |
|
| 43 | + __DIR__.'/../../public/images/vendor' => public_path('images/vendor') |
|
| 44 | 44 | ], 'assets'); |
| 45 | 45 | |
| 46 | 46 | // Translations |
| 47 | - $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'uccello'); |
|
| 47 | + $this->loadTranslationsFrom(__DIR__.'/../../resources/lang', 'uccello'); |
|
| 48 | 48 | |
| 49 | 49 | // Migrations |
| 50 | - $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); |
|
| 50 | + $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); |
|
| 51 | 51 | |
| 52 | 52 | // Commands |
| 53 | 53 | if ($this->app->runningInConsole()) { |
@@ -61,12 +61,12 @@ discard block |
||
| 61 | 61 | { |
| 62 | 62 | // Config |
| 63 | 63 | $this->mergeConfigFrom( |
| 64 | - __DIR__ . '/../../config/uccello.php', |
|
| 64 | + __DIR__.'/../../config/uccello.php', |
|
| 65 | 65 | 'uccello' |
| 66 | 66 | ); |
| 67 | 67 | |
| 68 | 68 | // Helper |
| 69 | - App::bind('uccello', function () { |
|
| 69 | + App::bind('uccello', function() { |
|
| 70 | 70 | return new \Uccello\Core\Helpers\Uccello; |
| 71 | 71 | }); |
| 72 | 72 | |
@@ -32,7 +32,7 @@ |
||
| 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 | |
@@ -211,7 +211,7 @@ |
||
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | // Label |
| 214 | - $label = $menuLink->type === 'module' ? uctrans($menuLink->label, $module) : uctrans($menuLink->label, $this->module);; |
|
| 214 | + $label = $menuLink->type === 'module' ? uctrans($menuLink->label, $module) : uctrans($menuLink->label, $this->module); ; |
|
| 215 | 215 | |
| 216 | 216 | // Icon |
| 217 | 217 | if ($menuLink->type === 'folder') { |
@@ -150,8 +150,7 @@ discard block |
||
| 150 | 150 | $total = $model->$countMethod($relatedList, $recordId); |
| 151 | 151 | $totalFiltered = $total; |
| 152 | 152 | } |
| 153 | - } |
|
| 154 | - elseif ($relatedListId && $action === 'select') { |
|
| 153 | + } elseif ($relatedListId && $action === 'select') { |
|
| 155 | 154 | // Get related list |
| 156 | 155 | $relatedList = Relatedlist::find($relatedListId); |
| 157 | 156 | |
@@ -176,8 +175,7 @@ discard block |
||
| 176 | 175 | $total = $initialQuery->whereNotIn($model->getKeyName(), $filteredRecordIds)->count(); |
| 177 | 176 | $totalFiltered = $total; |
| 178 | 177 | } |
| 179 | - } |
|
| 180 | - else { |
|
| 178 | + } else { |
|
| 181 | 179 | // Make the query |
| 182 | 180 | $records = $query->get(); |
| 183 | 181 | } |
@@ -81,9 +81,9 @@ discard block |
||
| 81 | 81 | $savePageLength = $request->input('save_page_length'); |
| 82 | 82 | |
| 83 | 83 | // Optional data |
| 84 | - $data = []; |
|
| 84 | + $data = [ ]; |
|
| 85 | 85 | if ($savePageLength) { |
| 86 | - $data["length"] = $request->input('page_length'); |
|
| 86 | + $data[ "length" ] = $request->input('page_length'); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | $filter = Filter::firstOrNew([ |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | if ($relatedList && $relatedList->method) { |
| 241 | 241 | // Related list method |
| 242 | 242 | $method = $relatedList->method; |
| 243 | - $recordIdsMethod = $method . 'RecordIds'; |
|
| 243 | + $recordIdsMethod = $method.'RecordIds'; |
|
| 244 | 244 | |
| 245 | 245 | // Get related records ids |
| 246 | 246 | $model = new $modelClass; |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | |
| 249 | 249 | // Add the record id itself to be filtered |
| 250 | 250 | if ($relatedList->related_module_id === $module->id && !empty($recordId) && !$filteredRecordIds->contains($recordId)) { |
| 251 | - $filteredRecordIds[] = (int)$recordId; |
|
| 251 | + $filteredRecordIds[ ] = (int)$recordId; |
|
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | // Make the query |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | {{-- Badge --}} |
| 23 | 23 | <?php |
| 24 | 24 | $relatedModule = $relatedlist->relatedModule; |
| 25 | - $countMethod = $relatedlist->method . 'Count'; |
|
| 25 | + $countMethod = $relatedlist->method.'Count'; |
|
| 26 | 26 | |
| 27 | 27 | $model = new $relatedModule->model_class; |
| 28 | 28 | $count = $model->$countMethod($relatedlist, $record->id); |
@@ -294,7 +294,7 @@ |
||
| 294 | 294 | * @param string $type |
| 295 | 295 | * @return array |
| 296 | 296 | */ |
| 297 | - public function getDatatableColumns(Module $module, $filterId=null, $type='list'): array |
|
| 297 | + public function getDatatableColumns(Module $module, $filterId = null, $type = 'list'): array |
|
| 298 | 298 | { |
| 299 | 299 | $columns = [ ]; |
| 300 | 300 | |
@@ -91,8 +91,8 @@ |
||
| 91 | 91 | {{ uctrans('field.'.$column['name'], $module) }} |
| 92 | 92 | <?php |
| 93 | 93 | $searchValue = null; |
| 94 | - if ($selectedFilter && !empty($selectedFilter->conditions->search->{$column['name']})) { |
|
| 95 | - $searchValue = $selectedFilter->conditions->search->{$column['name']}; |
|
| 94 | + if ($selectedFilter && !empty($selectedFilter->conditions->search->{$column[ 'name' ]})) { |
|
| 95 | + $searchValue = $selectedFilter->conditions->search->{$column[ 'name' ]}; |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | // If a special template exists, use it. Else use the generic template |
@@ -15,8 +15,8 @@ |
||
| 15 | 15 | <div class="body"> |
| 16 | 16 | <div class="row display-flex"> |
| 17 | 17 | <?php |
| 18 | - $record = $config['record']; |
|
| 19 | - $data = $config['data']; |
|
| 18 | + $record = $config[ 'record' ]; |
|
| 19 | + $data = $config[ 'data' ]; |
|
| 20 | 20 | ?> |
| 21 | 21 | @if (!empty($data) && is_array($data->fields)) |
| 22 | 22 | @foreach ($data->fields as $fieldName) |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | |
| 67 | 67 | if ($this->data->package ?? false) { |
| 68 | 68 | $packageParts = explode('/', $this->data->package); |
| 69 | - $package = $packageParts[count($packageParts)-1].'::'; |
|
| 69 | + $package = $packageParts[ count($packageParts) - 1 ].'::'; |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | return $package; |