Passed
Pull Request — master (#1139)
by Iman
03:48
created
src/Modules/ModuleGenerator/FileManipulator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
 
230 230
     public static function stringify($input, $indent = "")
231 231
     {
232
-        if (! is_array($input)) {
232
+        if (!is_array($input)) {
233 233
             return var_export($input, true);
234 234
         }
235 235
         $buffer = [];
Please login to merge, or discard this patch.
src/CBCoreModule/ViewHelpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
         @$get = $_GET;
10 10
         $inputhtml = '';
11 11
 
12
-        if (! $get) {
12
+        if (!$get) {
13 13
             return $inputhtml;
14 14
         }
15 15
         if (is_array($exception)) {
Please login to merge, or discard this patch.
src/controllers/Helpers/IndexImport.php 1 patch
Spacing   +5 added lines, -5 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,7 +142,7 @@  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)) {
145
+            if (!class_exists($relation_class)) {
146 146
                 $relation_class = '\App\Http\Controllers\\'.$relation_moduls->controller;
147 147
             }
148 148
             $relation_class = new $relation_class;
Please login to merge, or discard this patch.
src/Modules/ModuleGenerator/Step3Handler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function showForm($id)
10 10
     {
11
-        $row = ModulesRepo::find($id);;
11
+        $row = ModulesRepo::find($id); ;
12 12
 
13 13
         $columns = DbInspector::getTableCols($row->table_name);
14 14
 
Please login to merge, or discard this patch.
src/CBCoreModule/RouteController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     private static function getControllerMethods($ctrl)
64 64
     {
65 65
         $controller_methods = (new \ReflectionClass($ctrl))->getMethods(\ReflectionMethod::IS_PUBLIC);
66
-        $controller_methods = array_filter($controller_methods, function ($method) {
66
+        $controller_methods = array_filter($controller_methods, function($method) {
67 67
             return ($method->class !== 'Illuminate\Routing\Controller' && $method->name !== 'getIndex');
68 68
         });
69 69
 
Please login to merge, or discard this patch.
src/controllers/CBController/IndexAjax.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
         $datatableWhere = urldecode(request('datatable_where'));
16 16
         $foreignKeyName = request('fk_name');
17 17
         $foreignKeyValue = request('fk_value');
18
-        if (! $table || ! $label || ! $foreignKeyName || ! $foreignKeyValue) {
18
+        if (!$table || !$label || !$foreignKeyName || !$foreignKeyValue) {
19 19
             return response()->json([]);
20 20
         }
21 21
         $query = DB::table($table);
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     public function getDataQuery()
52 52
     {
53 53
         $key = request('query');
54
-        if (! Cache::has($key)) {
54
+        if (!Cache::has($key)) {
55 55
             return response()->json(['items' => []]);
56 56
         }
57 57
         $query = Cache::get($key);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         if (request('q')) {
94 94
             return;
95 95
         }
96
-        $result->where(function ($where) use ($columns) {
96
+        $result->where(function($where) use ($columns) {
97 97
             foreach ($columns as $c => $col) {
98 98
                 if ($c == 0) {
99 99
                     $where->where($col, 'like', '%'.request('q').'%');
Please login to merge, or discard this patch.
src/controllers/ApiController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
      * @param $name
75 75
      * @return mixed
76 76
      */
77
-   /* private function handleBase64($value, $uploads_format_candidate, $row_assign, $name)
77
+    /* private function handleBase64($value, $uploads_format_candidate, $row_assign, $name)
78 78
     {
79 79
         $filedata = base64_decode($value);
80 80
         $f = finfo_open();
Please login to merge, or discard this patch.
src/Modules/ModuleGenerator/Step2Handler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         $columnScript[] = str_repeat(' ', 12).'$this->col[] = [];';
63 63
         foreach ($labels as $i => $label) {
64 64
 
65
-            if (! $name[$i]) {
65
+            if (!$name[$i]) {
66 66
                 continue;
67 67
             }
68 68
 
Please login to merge, or discard this patch.
src/helpers/CRUDBooster.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     public static function first($table, $id)
111 111
     {
112 112
         $table = self::parseSqlTable($table)['table'];
113
-        if (! is_array($id)) {
113
+        if (!is_array($id)) {
114 114
             $pk = DbInspector::findPK($table);
115 115
 
116 116
             return DB::table($table)->where($pk, $id)->first();
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         $controllerName = basename($controllerName);
144 144
         $route_url = route($controllerName.'GetIndex');
145 145
 
146
-        if (! $path) {
146
+        if (!$path) {
147 147
             return trim($route_url, '/');
148 148
         }
149 149
 
@@ -171,11 +171,11 @@  discard block
 block discarded – undo
171 171
 
172 172
     public static function listCbTables()
173 173
     {
174
-        $tables = array_map(function ($table) {
174
+        $tables = array_map(function($table) {
175 175
             return $table->TABLE_NAME;
176 176
         }, DbInspector::listTables());
177 177
 
178
-        $filter = function ($tableName) {
178
+        $filter = function($tableName) {
179 179
 
180 180
             if ($tableName == config('database.migrations')) {
181 181
                 return false;
Please login to merge, or discard this patch.