@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | public static function first($table, $id) |
97 | 97 | { |
98 | 98 | $table = self::parseSqlTable($table)['table']; |
99 | - if (! is_array($id)) { |
|
99 | + if (!is_array($id)) { |
|
100 | 100 | $pk = DbInspector::findPK($table); |
101 | 101 | |
102 | 102 | return DB::table($table)->where($pk, $id)->first(); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $controllerName = basename($controllerName); |
123 | 123 | $routeUrl = route($controllerName.'GetIndex'); |
124 | 124 | |
125 | - if (! $path) { |
|
125 | + if (!$path) { |
|
126 | 126 | return trim($routeUrl, '/'); |
127 | 127 | } |
128 | 128 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | { |
153 | 153 | $tables = DbInspector::listTables(); |
154 | 154 | |
155 | - $filter = function ($tableName) { |
|
155 | + $filter = function($tableName) { |
|
156 | 156 | |
157 | 157 | if ($tableName == config('database.migrations')) { |
158 | 158 | return false; |
@@ -60,7 +60,7 @@ |
||
60 | 60 | { |
61 | 61 | $methods = (new \ReflectionClass($ctrl))->getMethods(\ReflectionMethod::IS_PUBLIC); |
62 | 62 | |
63 | - return array_filter($methods, function ($method) { |
|
63 | + return array_filter($methods, function($method) { |
|
64 | 64 | return ($method->class !== 'Illuminate\Routing\Controller' && $method->name !== 'getIndex'); |
65 | 65 | }); |
66 | 66 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | foreach (Request::input('privileges', []) as $moduleId => $data) { |
100 | 100 | //Check Menu |
101 | 101 | |
102 | - $arrs = array_get_keys($data, ['is_visible', 'is_create', 'is_read', 'is_edit', 'is_delete',], 0); |
|
102 | + $arrs = array_get_keys($data, ['is_visible', 'is_create', 'is_read', 'is_edit', 'is_delete', ], 0); |
|
103 | 103 | $this->savePermissions($id, $moduleId, $arrs); |
104 | 104 | } |
105 | 105 | |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $this->col[] = [ |
186 | 186 | 'label' => 'Superadmin', |
187 | 187 | 'name' => 'is_superadmin', |
188 | - 'callback' => function ($row) { |
|
188 | + 'callback' => function($row) { |
|
189 | 189 | return ($row->is_superadmin) ? "<span class='label label-success'>Superadmin</span>" : "<span class='label label-default'>Standard</span>"; |
190 | 190 | }, |
191 | 191 | ]; |
@@ -58,7 +58,7 @@ |
||
58 | 58 | */ |
59 | 59 | private function limitRows($data) |
60 | 60 | { |
61 | - $num = (int)$data['limit'] ?: 10; |
|
61 | + $num = (int) $data['limit'] ?: 10; |
|
62 | 62 | $this->rows->take($num); |
63 | 63 | } |
64 | 64 |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $format_validation[] = $this->existOrUnique($config, $type); |
28 | 28 | } elseif (in_array($type, ['date_format', 'digits_between', 'in', 'mimes', 'min', 'max', 'not_in'])) { |
29 | 29 | $format_validation[] = $type.':'.$config; |
30 | - } elseif (! in_array($type, $typeExcept)) { |
|
30 | + } elseif (!in_array($type, $typeExcept)) { |
|
31 | 31 | $format_validation[] = $type; |
32 | 32 | } |
33 | 33 |
@@ -4,7 +4,7 @@ |
||
4 | 4 | 'middleware' => ['web', \crocodicstudio\crudbooster\middlewares\CBSuperadmin::class], |
5 | 5 | 'prefix' => cbAdminPath(), |
6 | 6 | 'namespace' => cbModulesNS('StatisticModule'), |
7 | -], function () { |
|
7 | +], function() { |
|
8 | 8 | Route::get('statistic-builder/', 'AdminStatisticBuilderController@getIndex')->name('AdminStatisticBuilderControllerGetIndex'); |
9 | 9 | Route::get('statistic-builder/show-dashboard', 'AdminStatisticBuilderController@getShowDashboard')->name('AdminStatisticBuilderControllerGetShowDashboard'); |
10 | 10 | Route::get('statistic-builder/show', 'AdminStatisticBuilderController@getShow')->name('AdminStatisticBuilderControllerGetShow'); |
@@ -116,7 +116,7 @@ |
||
116 | 116 | */ |
117 | 117 | private function tokenMissMatchDevice($senderToken, $userAgent, $serverToken) |
118 | 118 | { |
119 | - if (! Cache::has($senderToken) || Cache::get($senderToken) == $userAgent) { |
|
119 | + if (!Cache::has($senderToken) || Cache::get($senderToken) == $userAgent) { |
|
120 | 120 | return; |
121 | 121 | } |
122 | 122 | $result = [ |
@@ -94,11 +94,11 @@ discard block |
||
94 | 94 | $component_name = $component->component_name; |
95 | 95 | $area_name = $component->area_name; |
96 | 96 | $config = json_decode($component->config); |
97 | - if (! $config) { |
|
97 | + if (!$config) { |
|
98 | 98 | return response()->json(compact('componentID', 'layout')); |
99 | 99 | } |
100 | 100 | foreach ($config as $key => $value) { |
101 | - if (! $value) { |
|
101 | + if (!$value) { |
|
102 | 102 | continue; |
103 | 103 | } |
104 | 104 | $command = 'showFunction'; |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | 'name' => 'Untitled', |
127 | 127 | ]; |
128 | 128 | |
129 | - if (! $data['created_at'] && Schema::hasColumn('cms_statistic_components', 'created_at')) { |
|
129 | + if (!$data['created_at'] && Schema::hasColumn('cms_statistic_components', 'created_at')) { |
|
130 | 130 | $data['created_at'] = YmdHis(); |
131 | 131 | } |
132 | 132 |
@@ -6,7 +6,7 @@ |
||
6 | 6 | { |
7 | 7 | public static function getSetting($name) |
8 | 8 | { |
9 | - return cache()->rememberForever('crudbooster_setting_'.$name, function () use($name) { |
|
9 | + return cache()->rememberForever('crudbooster_setting_'.$name, function() use($name) { |
|
10 | 10 | return \DB::table('cms_settings')->where('name', $name)->first()->content; |
11 | 11 | }); |
12 | 12 | } |