@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | protected $tablePrefix; |
13 | 13 | |
14 | - public function __construct(array $attributes = []) |
|
14 | + public function __construct(array $attributes = [ ]) |
|
15 | 15 | { |
16 | 16 | parent::__construct($attributes); |
17 | 17 | |
@@ -34,9 +34,9 @@ discard block |
||
34 | 34 | |
35 | 35 | protected function initTableName() |
36 | 36 | { |
37 | - if($this->table) |
|
37 | + if ($this->table) |
|
38 | 38 | { |
39 | - $this->table = $this->tablePrefix . $this->table; |
|
39 | + $this->table = $this->tablePrefix.$this->table; |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | } |
43 | 43 | \ No newline at end of file |
@@ -36,13 +36,13 @@ |
||
36 | 36 | public function getFormOptions($record, Field $field, Module $module) : array |
37 | 37 | { |
38 | 38 | if (!is_object($field->data)) { |
39 | - return []; |
|
39 | + return [ ]; |
|
40 | 40 | } |
41 | 41 | |
42 | - $choices = []; |
|
42 | + $choices = [ ]; |
|
43 | 43 | if ($field->data->choices) { |
44 | 44 | foreach ($field->data->choices as $choice) { |
45 | - $choices[$choice] = uctrans($choice, $module); |
|
45 | + $choices[ $choice ] = uctrans($choice, $module); |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | { |
33 | 33 | $options = parent::getFormOptions($record, $field, $module); |
34 | 34 | |
35 | - $options['attr'] = ['class' => 'form-control datepicker']; |
|
35 | + $options[ 'attr' ] = [ 'class' => 'form-control datepicker' ]; |
|
36 | 36 | |
37 | 37 | return $options; |
38 | 38 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | * @param \Uccello\Core\Models\Module|null $module |
43 | 43 | * @return string|null |
44 | 44 | */ |
45 | - public function getFormattedValueToSave(Request $request, Field $field, $value, $record=null, ?Domain $domain=null, ?Module $module=null) : ?string |
|
45 | + public function getFormattedValueToSave(Request $request, Field $field, $value, $record = null, ?Domain $domain = null, ?Module $module = null) : ?string |
|
46 | 46 | { |
47 | 47 | return Hash::make($value); |
48 | 48 | } |
@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | public function getFormOptions($record, Field $field, Module $module) : array |
43 | 43 | { |
44 | - $options['attr'] = ['class' => 'form-control timepicker']; |
|
44 | + $options[ 'attr' ] = [ 'class' => 'form-control timepicker' ]; |
|
45 | 45 | |
46 | 46 | return $options; |
47 | 47 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | */ |
46 | 46 | public function getFormOptions($record, Field $field, Module $module) : array |
47 | 47 | { |
48 | - $options['attr'] = ['class' => 'form-control datetimepicker']; |
|
48 | + $options[ 'attr' ] = [ 'class' => 'form-control datetimepicker' ]; |
|
49 | 49 | |
50 | 50 | return $options; |
51 | 51 | } |
@@ -29,13 +29,13 @@ |
||
29 | 29 | public function getFormOptions($record, Field $field, Module $module) : array |
30 | 30 | { |
31 | 31 | if (!is_object($field->data)) { |
32 | - return []; |
|
32 | + return [ ]; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | $options = parent::getFormOptions($record, $field, $module); |
36 | 36 | |
37 | - $options['expanded'] = true; |
|
38 | - $options['multiple'] = $field->data->multiple ?? false; |
|
37 | + $options[ 'expanded' ] = true; |
|
38 | + $options[ 'multiple' ] = $field->data->multiple ?? false; |
|
39 | 39 | |
40 | 40 | return $options; |
41 | 41 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | * @param \Uccello\Core\Models\Module|null $module |
51 | 51 | * @return string|null |
52 | 52 | */ |
53 | - public function getFormattedValueToSave(Request $request, Field $field, $value, $record=null, ?Domain $domain=null, ?Module $module=null) : ?string |
|
53 | + public function getFormattedValueToSave(Request $request, Field $field, $value, $record = null, ?Domain $domain = null, ?Module $module = null) : ?string |
|
54 | 54 | { |
55 | 55 | //TODO: Delete old file |
56 | 56 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | // Make directory path |
64 | 64 | $directoryPath = isset($fieldData->public) && $fieldData->public === true ? 'public/' : ''; // Public or Private |
65 | - $directoryPath .= isset($domain) ? $domain->slug . '/' : ''; // Domain |
|
65 | + $directoryPath .= isset($domain) ? $domain->slug.'/' : ''; // Domain |
|
66 | 66 | $directoryPath .= isset($fieldData->path) ? trim($fieldData->path, '/') : ''; // Custom directory |
67 | 67 | |
68 | 68 | // Save file |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | } |
73 | 73 | // Delete file |
74 | - elseif ($request->input('delete-' . $field->name)) { |
|
74 | + elseif ($request->input('delete-'.$field->name)) { |
|
75 | 75 | $value = null; |
76 | 76 | |
77 | 77 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $fieldData = $field->data; |
99 | 99 | |
100 | 100 | // If the file is defined and is public, get its url |
101 | - if ($value && isset($fieldData->public) && $fieldData->public === true ) { |
|
101 | + if ($value && isset($fieldData->public) && $fieldData->public === true) { |
|
102 | 102 | $value = Storage::url($value); |
103 | 103 | } |
104 | 104 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | public function getFormOptions($record, Field $field, Module $module) : array |
35 | 35 | { |
36 | - $options['attr'] = ['class' => 'form-control weekpicker']; |
|
36 | + $options[ 'attr' ] = [ 'class' => 'form-control weekpicker' ]; |
|
37 | 37 | |
38 | 38 | return $options; |
39 | 39 | } |