@@ -68,7 +68,7 @@ |
||
68 | 68 | |
69 | 69 | foreach ($selects_data as $d) { |
70 | 70 | $val = $d->{$select_field_alias}; |
71 | - if ($val == '' || ! $d->id) continue; |
|
71 | + if ($val == '' || !$d->id) continue; |
|
72 | 72 | |
73 | 73 | $checked = ($value == $d->id) ? "checked" : ""; |
74 | 74 |
@@ -68,7 +68,9 @@ |
||
68 | 68 | |
69 | 69 | foreach ($selects_data as $d) { |
70 | 70 | $val = $d->{$select_field_alias}; |
71 | - if ($val == '' || ! $d->id) continue; |
|
71 | + if ($val == '' || ! $d->id) { |
|
72 | + continue; |
|
73 | + } |
|
72 | 74 | |
73 | 75 | $checked = ($value == $d->id) ? "checked" : ""; |
74 | 76 |
@@ -3,9 +3,9 @@ |
||
3 | 3 | * @param $form |
4 | 4 | * @return array |
5 | 5 | */ |
6 | -$queryData = function ($form) |
|
6 | +$queryData = function($form) |
|
7 | 7 | { |
8 | - if (! $formInput['options']['table']) return; |
|
8 | + if (!$formInput['options']['table']) return; |
|
9 | 9 | $field_label = $formInput['options']['field_label']; |
10 | 10 | $field_value = $formInput['options']['field_value']; |
11 | 11 |
@@ -5,7 +5,9 @@ |
||
5 | 5 | */ |
6 | 6 | $queryData = function ($form) |
7 | 7 | { |
8 | - if (! $formInput['options']['table']) return; |
|
8 | + if (! $formInput['options']['table']) { |
|
9 | + return; |
|
10 | + } |
|
9 | 11 | $field_label = $formInput['options']['field_label']; |
10 | 12 | $field_value = $formInput['options']['field_value']; |
11 | 13 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | use crocodicstudio\crudbooster\Modules\ModuleGenerator\ControllerGenerator\FieldDetector; |
4 | 4 | |
5 | 5 | if (FieldDetector::isPassword($name)) { |
6 | - if (! empty($this->arr[$name])) { |
|
6 | + if (!empty($this->arr[$name])) { |
|
7 | 7 | $this->arr[$name] = Hash::make($this->arr[$name]); |
8 | 8 | } else { |
9 | 9 | unset($this->arr[$name]); |
@@ -8,7 +8,7 @@ |
||
8 | 8 | array_walk($dataEnum, 'trim'); |
9 | 9 | |
10 | 10 | $radios = []; |
11 | -foreach ($dataEnum as $e=>$enum){ |
|
11 | +foreach ($dataEnum as $e=>$enum) { |
|
12 | 12 | $enum = explode('|', $enum); |
13 | 13 | if (count($enum) == 1) { |
14 | 14 | $enum[1] = $enum[0]; |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | if ($col['datatable']) { |
3 | 3 | $tableJoin = explode(',', $col['datatable'])[0]; |
4 | 4 | $titleField = explode(',', $col['datatable'])[1]; |
5 | - if (! $col['datatable_where']) { |
|
5 | + if (!$col['datatable_where']) { |
|
6 | 6 | $data = CRUDBooster::get($tableJoin, NULL, "$titleField ASC"); |
7 | 7 | } else { |
8 | 8 | $data = CRUDBooster::get($tableJoin, $col['datatable_where'], "$titleField ASC"); |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | } |
14 | 14 | } else { |
15 | 15 | $data = $col['dataenum']; |
16 | - $data = (is_array($data))?$data:explode(";",$data); |
|
16 | + $data = (is_array($data)) ? $data : explode(";", $data); |
|
17 | 17 | $options = []; |
18 | 18 | foreach ($data as $i => $d) { |
19 | 19 | $enum = explode('|', $d); |
@@ -26,7 +26,7 @@ |
||
26 | 26 | <i class="fa fa-pencil-square-o"></i> {{cbTrans("text_form")}}</div> |
27 | 27 | <div class="panel-body child-form-area"> |
28 | 28 | @foreach($formInput['columns'] as $col) |
29 | - <?php $name_column = $name.$col['name'];?> |
|
29 | + <?php $name_column = $name.$col['name']; ?> |
|
30 | 30 | <div class='form-group'> |
31 | 31 | @if($col['type']!='hidden') |
32 | 32 | <label class="control-label col-sm-2">{{$col['label']}} |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | $options = []; |
3 | -if (! $formInput['options']['parent_select'] && @$formInput['options']['query']): |
|
3 | +if (!$formInput['options']['parent_select'] && @$formInput['options']['query']): |
|
4 | 4 | foreach (DB::select(DB::raw($formInput['options']['query'])) as $index => $d) { |
5 | 5 | $options[$i]['select'] = ($value == $d->{$formInput['options']['field_value']}) ? "selected" : ""; |
6 | 6 | if ($formInput['options']['format']) { |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -$default = ! empty($formInput['placeholder']) ? $formInput['placeholder'] : cbTrans('text_prefix_option')." ".$label; |
|
2 | +$default = !empty($formInput['placeholder']) ? $formInput['placeholder'] : cbTrans('text_prefix_option')." ".$label; |
|
3 | 3 | $query = str_random(5); |
4 | 4 | \Cache::forget($query); |
5 | 5 | \Cache::forever($query, $formInput['options']['query']); |
@@ -15,7 +15,7 @@ |
||
15 | 15 | sendAndTerminate($redir); |
16 | 16 | } |
17 | 17 | |
18 | - if ($ro['options']['allowed_filetype'] && ! in_array($ext, $ro['options']['allowed_filetype'])) { |
|
18 | + if ($ro['options']['allowed_filetype'] && !in_array($ext, $ro['options']['allowed_filetype'])) { |
|
19 | 19 | $redir = redirect()->back()->with([ |
20 | 20 | 'message_type' => 'warning', |
21 | 21 | 'message' => 'The filetype for '.$name.' is not allowed', |