Passed
Push — master ( 80f04b...ded670 )
by Iman
03:52
created
src/controllers/Helpers/IndexImport.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     function uploadImportData($file)
51 51
     {
52 52
         $dir = 'uploads/'.date('Y-m');
53
-        $filename = md5(str_random(5)).'.'. $file->getClientOriginalExtension();
53
+        $filename = md5(str_random(5)).'.'.$file->getClientOriginalExtension();
54 54
 
55 55
         //Create Directory Monthly
56 56
         Storage::makeDirectory($dir);
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     function validateForImport($file)
69 69
     {
70
-        return Validator::make(['extension' => $file->getClientOriginalExtension(),], ['extension' => 'in:xls,xlsx,csv']);
70
+        return Validator::make(['extension' => $file->getClientOriginalExtension(), ], ['extension' => 'in:xls,xlsx,csv']);
71 71
     }
72 72
 
73 73
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         $file = base64_decode(request('file'));
85 85
         $file = 'storage'.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.$file;
86
-        $rows = Excel::load($file, function ($reader) {
86
+        $rows = Excel::load($file, function($reader) {
87 87
         })->get();
88 88
 
89 89
         //$data_import_column = [];
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         foreach ($select_column as $sk => $s) {
129 129
             $colname = $table_columns[$sk];
130 130
 
131
-            if (! DbInspector::isForeignKey($colname) || intval($value->$s)) {
131
+            if (!DbInspector::isForeignKey($colname) || intval($value->$s)) {
132 132
                 $a[$colname] = $value->$s;
133 133
                 continue;
134 134
             }
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
             $relation_moduls = DB::table('cms_moduls')->where('table_name', $relation_table)->first();
143 143
 
144 144
             $relation_class = __NAMESPACE__.'\\'.$relation_moduls->controller;
145
-            if (! class_exists($relation_class)) {
146
-                $relation_class =  ctrlNamespace().'\\'.$relation_moduls->controller;
145
+            if (!class_exists($relation_class)) {
146
+                $relation_class = ctrlNamespace().'\\'.$relation_moduls->controller;
147 147
             }
148 148
             $relation_class = new $relation_class;
149 149
             $relation_class->genericLoader();
Please login to merge, or discard this patch.