@@ -51,7 +51,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
163 | 163 | $records = $query->paginate($length); |
164 | 164 | } |
165 | 165 | |
166 | - $records->getCollection()->transform(function ($record) use ($module) { |
|
166 | + $records->getCollection()->transform(function($record) use ($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 |
||
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([ |
@@ -27,7 +27,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -83,7 +83,7 @@ |
||
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 | } |
@@ -126,8 +126,8 @@ |
||
126 | 126 | */ |
127 | 127 | public function addConditionToSearchQuery(Builder $query, Field $field, $value) : Builder |
128 | 128 | { |
129 | - $query->where(function ($query) use($field, $value) { |
|
130 | - foreach ((array) $value as $_value) { |
|
129 | + $query->where(function($query) use($field, $value) { |
|
130 | + foreach ((array)$value as $_value) { |
|
131 | 131 | $query = $query->orWhere($field->column, '=', $_value); |
132 | 132 | } |
133 | 133 | }); |