Completed
Pull Request — master (#7)
by Jonathan
12:15
created
app/Database/Eloquent/Model.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
app/Fields/Uitype/Select.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Fields/Uitype/Date.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Fields/Uitype/Password.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Fields/Uitype/Time.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Fields/Uitype/DateTime.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Fields/Uitype/Choice.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
app/Fields/Uitype/File.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Fields/Uitype/Week.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.