Passed
Push — master ( 6429db...ea3910 )
by Iman
04:24
created
src/helpers/CRUDBooster.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/CBCoreModule/CbRouter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/CBCoreModule/Index.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         if ($filter_is_orderby === true) {
69 69
             (new Order($this->cb))->handle($result, $table);
70 70
         }
71
-        $limit = is_string($limit) ? (int)$limit : 15;
71
+        $limit = is_string($limit) ? (int) $limit : 15;
72 72
         $data['result'] = $result->paginate($limit);
73 73
 
74 74
         $data['columns'] = $columns_table;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         //LISTING INDEX HTML
81 81
         $addAction = $CbCtrl->data['addAction'];
82 82
 
83
-        if (! empty($CbCtrl->sub_module)) {
83
+        if (!empty($CbCtrl->sub_module)) {
84 84
             $addAction = $this->_handleSubModules($addAction);
85 85
         }
86 86
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     private function _handleParentTable()
102 102
     {
103 103
         $data = [];
104
-        $parent = (string)request('parent_table');
104
+        $parent = (string) request('parent_table');
105 105
         $pk = DbInspector::findPk(request('parent_table'));
106 106
 
107 107
         $data['parent_table'] = DB::table($parent)->where($pk, request('parent_id'))->first();
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             $data['parent_field'] = DbInspector::getTableForeignKey($parent);
112 112
         }
113 113
 
114
-        if (! $data['parent_field']) {
114
+        if (!$data['parent_field']) {
115 115
             return $data;
116 116
         }
117 117
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     private function _filterForParent($result)
131 131
     {
132
-        if (! request('parent_id')) {
132
+        if (!request('parent_id')) {
133 133
             return null;
134 134
         }
135 135
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     private function _filterOutSoftDeleted($tableColumns, $result)
145 145
     {
146
-        if (! in_array('deleted_at', $tableColumns)) {
146
+        if (!in_array('deleted_at', $tableColumns)) {
147 147
             return;
148 148
         }
149 149
         $result->where($this->table.'.deleted_at', '=', null);
@@ -202,9 +202,9 @@  discard block
 block discarded – undo
202 202
     private function _applyWhereAndQfilters($result, $columnsTable, $table)
203 203
     {
204 204
         if (request('q')) {
205
-            $result->where(function ($query) use ($columnsTable) {
205
+            $result->where(function($query) use ($columnsTable) {
206 206
                 foreach ($columnsTable as $col) {
207
-                    if (! $col['field_with']) {
207
+                    if (!$col['field_with']) {
208 208
                         continue;
209 209
                     }
210 210
                     $query->orwhere($col['field_with'], "like", "%".request("q")."%");
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         return CRUDBooster::adminPath($module['path']).'?parent_table='.$table_parent.'&parent_columns='
249 249
             .$module['parent_columns'].'&parent_columns_alias='
250 250
             .$module['parent_columns_alias'].'&parent_id=['
251
-            .(! isset($module['custom_parent_id']) ? "id" : $module['custom_parent_id'])
251
+            .(!isset($module['custom_parent_id']) ? "id" : $module['custom_parent_id'])
252 252
             .']&return_url='.urlencode(Request::fullUrl()).'&foreign_key='
253 253
             .$module['foreign_key'].'&label='.urlencode($module['label']);
254 254
     }
Please login to merge, or discard this patch.
src/Modules/PrivilegeModule/AdminPrivilegesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         ];
Please login to merge, or discard this patch.
src/CBCoreModule/Search.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/controllers/ApiController/ValidationRules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Modules/StatisticModule/statistic_route.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
src/routes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 
6 6
 $namespace = cbControllersNS();
7 7
 /* ROUTER FOR UPLOADS */
8
-Route::group(['middleware' => ['web'], 'namespace' => $namespace], function () {
8
+Route::group(['middleware' => ['web'], 'namespace' => $namespace], function() {
9 9
     Route::get('uploads/{one?}/{two?}/{three?}/{four?}/{five?}', ['uses' => 'FileController@getPreview', 'as' => 'fileControllerPreview']);
10 10
 });
11 11
 
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     'middleware' => ['web', CBBackend::class],
15 15
     'prefix' => cbAdminPath(),
16 16
     'namespace' => ctrlNamespace(),
17
-], function () {
17
+], function() {
18 18
     CbRouter::routeController('users', 'AdminUsersController');
19 19
     try {
20 20
         $modules = DB::table('cms_moduls')->where('path', '!=', '')->where('controller', '!=', '')->where('is_protected', 0)->get();
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     'middleware' => ['web', \crocodicstudio\crudbooster\middlewares\CBSuperadmin::class],
32 32
     'prefix' => cbAdminPath(),
33 33
     'namespace' => $namespace,
34
-], function () {
34
+], function() {
35 35
     Route::post('{module}/do-upload-import-data', 'FileController@uploadImportData')->name('UploadImportData');
36 36
     Route::post('{module}/upload-summernote', 'FileController@uploadSummernote')->name('UploadImportData');
37 37
     Route::post('{module}/upload-file', 'FileController@uploadFile')->name('UploadImportData');
Please login to merge, or discard this patch.
src/middlewares/CBAuthAPI.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
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 = [
Please login to merge, or discard this patch.