@@ -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; |
@@ -190,7 +190,7 @@ |
||
| 190 | 190 | |
| 191 | 191 | // Add order if needed |
| 192 | 192 | if (!empty($this->order)) { |
| 193 | - foreach($this->order as $fieldColumn => $order) { |
|
| 193 | + foreach ($this->order as $fieldColumn => $order) { |
|
| 194 | 194 | $query = $query->orderBy($fieldColumn, $order); |
| 195 | 195 | } |
| 196 | 196 | } |
@@ -27,19 +27,19 @@ |
||
| 27 | 27 | public function run() |
| 28 | 28 | { |
| 29 | 29 | // Get module |
| 30 | - $module = ucmodule($this->config['module']); |
|
| 30 | + $module = ucmodule($this->config[ 'module' ]); |
|
| 31 | 31 | |
| 32 | 32 | // Get record |
| 33 | 33 | $modelClass = $module->model_class; |
| 34 | - $record = $modelClass::find($this->config['record_id']); |
|
| 34 | + $record = $modelClass::find($this->config[ 'record_id' ]); |
|
| 35 | 35 | |
| 36 | 36 | return view('uccello::widgets.summary_fields', [ |
| 37 | 37 | 'config' => $this->config, |
| 38 | - 'domain' => ucdomain($this->config['domain']), |
|
| 38 | + 'domain' => ucdomain($this->config[ 'domain' ]), |
|
| 39 | 39 | 'module' => $module, |
| 40 | - 'data' => (object) $this->config['data'], |
|
| 40 | + 'data' => (object)$this->config[ 'data' ], |
|
| 41 | 41 | 'record' => $record, |
| 42 | - 'label' => $this->config['data']->label ?? $this->config['labelForTranslation'], |
|
| 42 | + 'label' => $this->config[ 'data' ]->label ?? $this->config[ 'labelForTranslation' ], |
|
| 43 | 43 | ]); |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -4,10 +4,10 @@ |
||
| 4 | 4 | $autocompleteSearch = false; |
| 5 | 5 | |
| 6 | 6 | $entities = [ ]; |
| 7 | - $relatedModule = ucmodule('user'); |
|
| 7 | + $relatedModule = ucmodule('user'); |
|
| 8 | 8 | $modelClass = $relatedModule->model_class; |
| 9 | 9 | |
| 10 | - if (isset($column['data']->autocomplete_search) && $column['data']->autocomplete_search === true) { |
|
| 10 | + if (isset($column[ 'data' ]->autocomplete_search) && $column[ 'data' ]->autocomplete_search === true) { |
|
| 11 | 11 | $autocompleteSearch = true; |
| 12 | 12 | } else { |
| 13 | 13 | $entities = $modelClass::all(); |
@@ -35,8 +35,8 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | // Get file data from request |
| 37 | 37 | $fileData = $this->getFileDataFromRequest(); |
| 38 | - $fileName = $fileData['name']; |
|
| 39 | - $filePath = $fileData['path']; |
|
| 38 | + $fileName = $fileData[ 'name' ]; |
|
| 39 | + $filePath = $fileData[ 'path' ]; |
|
| 40 | 40 | |
| 41 | 41 | // Check if file exists |
| 42 | 42 | if (!Storage::exists($filePath)) { |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $fileName = null; |
| 58 | 58 | $filePath = null; |
| 59 | 59 | |
| 60 | - $recordId = (int) request('id'); |
|
| 60 | + $recordId = (int)request('id'); |
|
| 61 | 61 | $fieldColumn = request('field'); |
| 62 | 62 | |
| 63 | 63 | // Get record |
@@ -70,8 +70,8 @@ discard block |
||
| 70 | 70 | $fileParts = explode(';', $fileData); |
| 71 | 71 | |
| 72 | 72 | if (count($fileParts) === 2) { |
| 73 | - $fileName = $fileParts[0]; |
|
| 74 | - $filePath = $fileParts[1]; |
|
| 73 | + $fileName = $fileParts[ 0 ]; |
|
| 74 | + $filePath = $fileParts[ 1 ]; |
|
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | @if ($value) |
| 23 | 23 | <?php |
| 24 | 24 | $valueParts = explode(';', $value); |
| 25 | - $fileName = $valueParts[0]; |
|
| 25 | + $fileName = $valueParts[ 0 ]; |
|
| 26 | 26 | ?> |
| 27 | 27 | <div class="input-field current-file"> |
| 28 | 28 | <div class="file-container"> |
@@ -87,8 +87,8 @@ |
||
| 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, 'like', $formattedValue); |
| 94 | 94 | } |
@@ -87,8 +87,8 @@ |
||
| 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 | } |
@@ -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 | |