Completed
Pull Request — master (#7)
by Jonathan
12:15
created
app/Fields/Uitype/Integer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,13 +47,13 @@
 block discarded – undo
47 47
     public function askFieldOptions(\StdClass &$module, \StdClass &$field, InputInterface $input, OutputInterface $output)
48 48
     {
49 49
         // Minimum value
50
-        $field->data->min = (int) $output->ask('What is the minimum value?');
50
+        $field->data->min = (int)$output->ask('What is the minimum value?');
51 51
 
52 52
         // Maximum value
53
-        $field->data->max = (int) $output->ask('What is the maximum value?');
53
+        $field->data->max = (int)$output->ask('What is the maximum value?');
54 54
 
55 55
         // Increment
56
-        $field->data->step = (int) $output->ask('What is the increment?', 1);
56
+        $field->data->step = (int)$output->ask('What is the increment?', 1);
57 57
     }
58 58
 
59 59
     /**
Please login to merge, or discard this patch.
app/Fields/Uitype/Entity.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
     public function getFormOptions($record, Field $field, Module $module) : array
40 40
     {
41 41
         if (!is_object($field->data)) {
42
-            return [];
42
+            return [ ];
43 43
         }
44 44
 
45
-        $options = [];
45
+        $options = [ ];
46 46
 
47 47
         if ($field->data->module) {
48 48
             $options = [
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
                 'property' => $field->data->field ?? 'recordLabel',
51 51
                 'empty_value' => uctrans('select_empty_value', $module),
52 52
                 'selected' => $record->{$field->column} ?? null,
53
-                'attr' => ['class' => 'form-control show-tick', 'data-live-search' => 'true'],
54
-                'query_builder' => function ($relatedRecord) use($record) {
53
+                'attr' => [ 'class' => 'form-control show-tick', 'data-live-search' => 'true' ],
54
+                'query_builder' => function($relatedRecord) use($record) {
55 55
                     // If related record class is the same as the record one, ignore the current record
56 56
                     if (get_class($relatedRecord) === get_class($record)) {
57 57
                         return $relatedRecord->where($relatedRecord->getKeyName(), '!=', $record->getKey());
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function getDefaultDatabaseColumn(Field $field) : string
74 74
     {
75
-        return $field->name . '_id';
75
+        return $field->name.'_id';
76 76
     }
77 77
 
78 78
     /**
@@ -147,14 +147,14 @@  discard block
 block discarded – undo
147 147
         // Get all modules
148 148
         $modules = Module::orderBy('name')->get();
149 149
 
150
-        $choices = [];
150
+        $choices = [ ];
151 151
         foreach ($modules as $_module) {
152
-            $choices[] = $_module->name;
152
+            $choices[ ] = $_module->name;
153 153
         }
154 154
 
155 155
         // Add module itself if necessary
156 156
         if (!in_array($module->name, $choices)) {
157
-            $choices[] = $module->name;
157
+            $choices[ ] = $module->name;
158 158
         }
159 159
 
160 160
         // Sort
Please login to merge, or discard this patch.
app/Fields/Uitype/Number.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,13 +62,13 @@
 block discarded – undo
62 62
     public function askFieldOptions(\StdClass &$module, \StdClass &$field, InputInterface $input, OutputInterface $output)
63 63
     {
64 64
         // Minimum value
65
-        $field->data->min = (int) $output->ask('What is the minimum value?');
65
+        $field->data->min = (int)$output->ask('What is the minimum value?');
66 66
 
67 67
         // Maximum value
68
-        $field->data->max = (int) $output->ask('What is the maximum value?');
68
+        $field->data->max = (int)$output->ask('What is the maximum value?');
69 69
 
70 70
         // Increment
71
-        $field->data->step = (int) $output->ask('What is the increment?', 0.01);
71
+        $field->data->step = (int)$output->ask('What is the increment?', 0.01);
72 72
 
73 73
         // Precision
74 74
         $field->data->precision = $output->ask('What is the precision? (e.g: Type 2 for having 0.01)', 2);
Please login to merge, or discard this patch.