Passed
Push — master ( 5761d8...1baca8 )
by Iman
04:17
created
src/controllers/Helpers/IndexImport.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public 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
     /**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
         $file = base64_decode(request('file'));
84 84
         $file = 'storage'.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.$file;
85
-        $rows = Excel::load($file, function ($reader) {
85
+        $rows = Excel::load($file, function($reader) {
86 86
         })->get();
87 87
 
88 88
         //$data_import_column = [];
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         foreach ($selectColumn as $sk => $s) {
128 128
             $colname = $table_columns[$sk];
129 129
 
130
-            if (! DbInspector::isForeignKey($colname) || intval($value->$s)) {
130
+            if (!DbInspector::isForeignKey($colname) || intval($value->$s)) {
131 131
                 $a[$colname] = $value->$s;
132 132
                 continue;
133 133
             }
@@ -175,10 +175,10 @@  discard block
 block discarded – undo
175 175
     {
176 176
         $module = ModulesRepo::getByTableName($table);
177 177
         if (is_null($module)) {
178
-            return ;
178
+            return;
179 179
         }
180 180
         $relation_class = __NAMESPACE__.'\\'.$module->controller;
181
-        if (! class_exists($relation_class)) {
181
+        if (!class_exists($relation_class)) {
182 182
             $relation_class = ctrlNamespace().'\\'.$module->controller;
183 183
         }
184 184
 
Please login to merge, or discard this patch.
src/helpers/GetCurrentX.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     public static function getCurrentModule()
25 25
     {
26 26
         $modulepath = self::getModulePath();
27
-        return cache()->remember('crudbooster_modules_'.$modulepath, 2, function () use ($modulepath) {
27
+        return cache()->remember('crudbooster_modules_'.$modulepath, 2, function() use ($modulepath) {
28 28
             return ModulesRepo::getByPath($modulepath);
29 29
         });
30 30
     }
Please login to merge, or discard this patch.
src/commands/CrudboosterInstallationCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
         $printer->printHeader();
36 36
 
37
-        if (! ((new RequirementChecker($this))->check())) {
37
+        if (!((new RequirementChecker($this))->check())) {
38 38
             $this->info('Sorry unfortunately your system is not meet with our requirements !');
39 39
             $printer->printFooter(false);
40 40
             $this->info('--');
Please login to merge, or discard this patch.
src/CBCoreModule/Installer/RequirementChecker.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
         $this->checkLaravelVersion();
26 26
         $this->checkPHPversion();
27 27
 
28
-        $extensions = ['mbstring', 'openssl', 'pdo', 'tokenizer', 'xml', 'gd', 'fileinfo',];
29
-        array_walk($extensions, function ($ext){
28
+        $extensions = ['mbstring', 'openssl', 'pdo', 'tokenizer', 'xml', 'gd', 'fileinfo', ];
29
+        array_walk($extensions, function($ext) {
30 30
             $this->chechExtension($ext);
31 31
         });
32 32
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     private function chechExtension($extension)
76 76
     {
77
-        if (! extension_loaded($extension)) {
77
+        if (!extension_loaded($extension)) {
78 78
             $this->console->info($extension.' extension: [Bad]');
79 79
             return $this->requirements = false;
80 80
         }
Please login to merge, or discard this patch.
src/CBCoreModule/Installer/CbInstaller.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
     public function createVendorAtPublic()
29 29
     {
30 30
         $this->console->info('Checking public/vendor directory...');
31
-        if (! file_exists(public_path('vendor'))) {
31
+        if (!file_exists(public_path('vendor'))) {
32 32
             mkdir(public_path('vendor'), 0777);
33 33
         }
34 34
 
35
-        if (! is_writable(public_path('vendor'))) {
35
+        if (!is_writable(public_path('vendor'))) {
36 36
             $this->console->info('Setup aborted !');
37 37
             $this->console->info('Please set public/vendor directory to writable 0777');
38 38
             exit;
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public function symlinkForUpload()
43 43
     {
44 44
         $this->console->info('Checking public/uploads symlink...');
45
-        if (! file_exists(public_path('uploads'))) {
45
+        if (!file_exists(public_path('uploads'))) {
46 46
             $this->console->info('Creating public/uploads symlink...');
47 47
             app('files')->link(storage_path('app'), public_path('uploads'));
48 48
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
     private function rrmdir($dir)
61 61
     {
62
-        if (! is_dir($dir)) {
62
+        if (!is_dir($dir)) {
63 63
             return;
64 64
         }
65 65
         foreach (scandir($dir) as $object) {
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         $vendorPath = public_path('vendor'.DIRECTORY_SEPARATOR.'crudbooster');
86 86
 
87
-        if (! file_exists($vendorPath)) {
87
+        if (!file_exists($vendorPath)) {
88 88
             $this->console->info('Creating public/vendor/crudbooster symlink...');
89 89
             app('files')->link(__DIR__.'/../assets', public_path('vendor/crudbooster'));
90 90
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         $this->console->info('Migrating database...');
117 117
         $this->console->call('migrate', ['--path' => '\database\migrations\crudbooster']);
118 118
 
119
-        if (! class_exists('CBSeeder')) {
119
+        if (!class_exists('CBSeeder')) {
120 120
             require_once __DIR__.'/../database/seeds/CBSeeder.php';
121 121
         }
122 122
         $this->console->callSilent('db:seed', ['--class' => 'CBSeeder']);
Please login to merge, or discard this patch.
src/controllers/ApiController/ApiValidations.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     {
45 45
         $ctrl->hookValidate();
46 46
 
47
-        if (! $ctrl->validate) {
47
+        if (!$ctrl->validate) {
48 48
             return true;
49 49
         }  // hook have to return true
50 50
         //todo : translation
Please login to merge, or discard this patch.
src/Modules/MenuModule/MenuRepo.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 {
10 10
     public static function sidebarMenu()
11 11
     {
12
-       $conditions = [
12
+        $conditions = [
13 13
             'cms_privileges' => CRUDBooster::myPrivilegeId(),
14 14
             'parent_id' => 0,
15 15
             'is_active' => 1,
Please login to merge, or discard this patch.
src/CBCoreModule/Index.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         if ($filter_is_orderby === true) {
67 67
             (new Order($this->cb))->handle($query, $table);
68 68
         }
69
-        $limit = is_string($limit) ? (int)$limit : 15;
69
+        $limit = is_string($limit) ? (int) $limit : 15;
70 70
         $data['result'] = $query->paginate($limit);
71 71
 
72 72
         $data['columns'] = $columns_table;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         //LISTING INDEX HTML
79 79
         $addAction = $CbCtrl->data['addAction'];
80 80
 
81
-        if (! empty($CbCtrl->sub_module)) {
81
+        if (!empty($CbCtrl->sub_module)) {
82 82
             $addAction = $this->_handleSubModules($addAction);
83 83
         }
84 84
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         //$orig_mainpath = $CbCtrl->data['mainpath'];
87 87
         //$titleField = $CbCtrl->titleField;
88 88
         $number = (request('page', 1) - 1) * $limit + 1;
89
-        $columnsTable = array_filter($columns_table, function ($col) {
89
+        $columnsTable = array_filter($columns_table, function($col) {
90 90
             return $col['visible'] !== false;
91 91
         });
92 92
         $htmlContents = (new RowContent($CbCtrl))->calculate($data, $number, $columnsTable, $addAction); //end foreach data[result]
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     private function _handleParentTable()
103 103
     {
104 104
         $data = [];
105
-        $parent = (string)request('parent_table');
105
+        $parent = (string) request('parent_table');
106 106
         $data['parent_table'] = CRUDBooster::first(request('parent_table'), request('parent_id'));
107 107
         if (request('foreign_key')) {
108 108
             $data['parent_field'] = request('foreign_key');
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             $data['parent_field'] = DbInspector::getTableForeignKey($parent);
111 111
         }
112 112
 
113
-        if (! $data['parent_field']) {
113
+        if (!$data['parent_field']) {
114 114
             return $data;
115 115
         }
116 116
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     private function _filterForParent($result)
130 130
     {
131
-        if (! request('parent_id')) {
131
+        if (!request('parent_id')) {
132 132
             return null;
133 133
         }
134 134
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      */
143 143
     private function _filterOutSoftDeleted($tableColumns, $result)
144 144
     {
145
-        if (! in_array('deleted_at', $tableColumns)) {
145
+        if (!in_array('deleted_at', $tableColumns)) {
146 146
             return;
147 147
         }
148 148
         $result->where($this->table.'.deleted_at', '=', null);
@@ -201,9 +201,9 @@  discard block
 block discarded – undo
201 201
     private function _applyWhereAndQfilters($result, $columnsTable, $table)
202 202
     {
203 203
         if (request('q')) {
204
-            $result->where(function ($query) use ($columnsTable) {
204
+            $result->where(function($query) use ($columnsTable) {
205 205
                 foreach ($columnsTable as $col) {
206
-                    if (! $col['field_with']) {
206
+                    if (!$col['field_with']) {
207 207
                         continue;
208 208
                     }
209 209
                     $query->orwhere($col['field_with'], "like", "%".request("q")."%");
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
         return CRUDBooster::adminPath($module['path']).'?parent_table='.$table_parent.'&parent_columns='
248 248
             .$module['parent_columns'].'&parent_columns_alias='
249 249
             .$module['parent_columns_alias'].'&parent_id=['
250
-            .(! isset($module['custom_parent_id']) ? "id" : $module['custom_parent_id'])
250
+            .(!isset($module['custom_parent_id']) ? "id" : $module['custom_parent_id'])
251 251
             .']&return_url='.urlencode(Request::fullUrl()).'&foreign_key='
252 252
             .$module['foreign_key'].'&label='.urlencode($module['label']);
253 253
     }
Please login to merge, or discard this patch.
src/Modules/LogsModule/CbLogsServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function boot()
15 15
     {
16
-        $this->loadRoutesFrom( __DIR__.'/logs_routes.php');
16
+        $this->loadRoutesFrom(__DIR__.'/logs_routes.php');
17 17
         $this->publishes([__DIR__.'/localization' => resource_path('lang')], 'cb_localization');
18 18
     }
19 19
 
Please login to merge, or discard this patch.