Passed
Push — master ( d1c6ec...66cfc7 )
by Iman
06:37
created
src/CBCoreModule/DataRemover.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      */
16 16
     public function __construct($ctrl)
17 17
     {
18
-        $this->ctrl =  $ctrl;
18
+        $this->ctrl = $ctrl;
19 19
     }
20 20
 
21 21
     /**
Please login to merge, or discard this patch.
src/controllers/CBController/FormSubmitHandlers.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
             $type = $form['type'] ?: 'text';
25 25
             $inputdata = request($name);
26 26
 
27
-            if (! $name || in_array($name, $hide_form) || $form['exception']) {
27
+            if (!$name || in_array($name, $hide_form) || $form['exception']) {
28 28
                 continue;
29 29
             }
30 30
 
Please login to merge, or discard this patch.
src/controllers/CBController/Deleter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         $this->genericLoader();
23 23
         $selectedIds = request('checkbox');
24 24
         $btnName = request('button_name');
25
-        if (! $selectedIds) {
25
+        if (!$selectedIds) {
26 26
             backWithMsg(cbTrans('at_least_one_row'), 'warning');
27 27
         }
28 28
         if ($btnName == 'delete') {
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
         $message = cbTrans('alert_action', ['action' => $action]);
46 46
 
47 47
         if ($this->actionButtonSelected($id_selected, $button_name) === false) {
48
-            $message = ! empty($this->alert['message']) ? $this->alert['message'] : 'Error';
49
-            $type = ! empty($this->alert['type']) ? $this->alert['type'] : 'danger';
48
+            $message = !empty($this->alert['message']) ? $this->alert['message'] : 'Error';
49
+            $type = !empty($this->alert['type']) ? $this->alert['type'] : 'danger';
50 50
         }
51 51
 
52 52
         backWithMsg($message, $type);
Please login to merge, or discard this patch.
src/CBCoreModule/middlewares/CBSuperadmin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@
 block discarded – undo
22 22
             return redirect(url($adminPath.'/login'))->with('message', cbTrans('not_logged_in'));
23 23
         }
24 24
 
25
-        if(!CRUDBooster::isSuperadmin()) {
25
+        if (!CRUDBooster::isSuperadmin()) {
26 26
             event('cb.unauthorizedTryToSuperAdminArea', [cbUser(), request()->fullUrlWithQuery()]);
27
-            return redirect($adminPath)->with(['message'=> cbTrans('denied_access'),'message_type'=>'warning']);
27
+            return redirect($adminPath)->with(['message'=> cbTrans('denied_access'), 'message_type'=>'warning']);
28 28
         }
29 29
 
30 30
         return $next($request);
Please login to merge, or discard this patch.
src/Modules/StatisticModule/AdminStatisticBuilderController.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
     public function getBuilder($id_cms_statistics)
71 71
     {
72
-       CRUDBooster::allowOnlySuperAdmin();
72
+        CRUDBooster::allowOnlySuperAdmin();
73 73
         $this->cbLoader();
74 74
 
75 75
         $page_title = 'Statistic Builder';
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
     public function getEditComponent($componentID)
151 151
     {
152
-       CRUDBooster::allowOnlySuperAdmin();
152
+        CRUDBooster::allowOnlySuperAdmin();
153 153
         $this->cbLoader();
154 154
 
155 155
         $component_row = CRUDBooster::first('cms_statistic_components', ['componentID' => $componentID]);
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 
174 174
     public function getDeleteComponent($id)
175 175
     {
176
-       CRUDBooster::allowOnlySuperAdmin();
176
+        CRUDBooster::allowOnlySuperAdmin();
177 177
 
178 178
         DB::table('cms_statistic_components')->where('componentID', $id)->delete();
179 179
 
Please login to merge, or discard this patch.
src/Modules/LogsModule/CbLogsServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
15 15
      */
16 16
     public function boot()
17 17
     {
18
-        $this->loadRoutesFrom( __DIR__.'/logs_routes.php');
18
+        $this->loadRoutesFrom(__DIR__.'/logs_routes.php');
19 19
         $this->publishes([__DIR__.'/localization' => resource_path('lang')], 'cb_localization');
20
-        $this->loadMigrationsFrom(__DIR__ . '/migrations');
20
+        $this->loadMigrationsFrom(__DIR__.'/migrations');
21 21
         Auth::registerListeners();
22 22
         CRUD::registerListeners();
23 23
     }
Please login to merge, or discard this patch.
src/Modules/LogsModule/Listeners/Auth.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,21 +18,21 @@  discard block
 block discarded – undo
18 18
 
19 19
     private static function forgottenPass()
20 20
     {
21
-        Event::listen('cb.forgottenPasswordRequested', function (string $email, string $ip) {
22
-            self::insertLog('Password Recovery Requested for '. $email);
21
+        Event::listen('cb.forgottenPasswordRequested', function(string $email, string $ip) {
22
+            self::insertLog('Password Recovery Requested for '.$email);
23 23
         });
24 24
     }
25 25
 
26 26
     private static function logOut()
27 27
     {
28
-        Event::listen('cb.userLoggedOut', function (CbUser $user) {
28
+        Event::listen('cb.userLoggedOut', function(CbUser $user) {
29 29
             self::insertLog('Logout '.$user->email);
30 30
         });
31 31
     }
32 32
 
33 33
     private static function logIn()
34 34
     {
35
-        Event::listen('cb.userLoggedIn', function (CbUser $user, $time, $ip) {
35
+        Event::listen('cb.userLoggedIn', function(CbUser $user, $time, $ip) {
36 36
             self::insertLog('Login '.$user->email);
37 37
         });
38 38
     }
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
 
45 45
     private static function illegalAccessTry()
46 46
     {
47
-        Event::listen('cb.unauthorizedTryToSuperAdminArea', function (CbUser $user, $fullUrl) {
48
-            self::insertLog('Warning - Try To Access Unauthorized Super Admin Area at: '. $fullUrl, $user->id);
47
+        Event::listen('cb.unauthorizedTryToSuperAdminArea', function(CbUser $user, $fullUrl) {
48
+            self::insertLog('Warning - Try To Access Unauthorized Super Admin Area at: '.$fullUrl, $user->id);
49 49
         });
50 50
 
51
-        Event::listen('cb.unauthorizedTryStopped', function (CbUser $user, $fullUrl) {
52
-            self::insertLog('Warning - Try To Access Unauthorized Resource at: '. $fullUrl, $user->id);
51
+        Event::listen('cb.unauthorizedTryStopped', function(CbUser $user, $fullUrl) {
52
+            self::insertLog('Warning - Try To Access Unauthorized Resource at: '.$fullUrl, $user->id);
53 53
         });
54 54
 
55 55
     }
Please login to merge, or discard this patch.
src/Modules/LogsModule/Listeners/CRUD.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 
18 18
     private static function delete()
19 19
     {
20
-        Event::listen('cb.dataDeleted', function (string $table, array $ids, string $time, CbUser $user) {
20
+        Event::listen('cb.dataDeleted', function(string $table, array $ids, string $time, CbUser $user) {
21 21
             $ids = implode(', ', $ids);
22 22
             self::insertLog("Data deleted from $table table with Ids: $ids at $time", $user->id);
23 23
         });
@@ -30,21 +30,21 @@  discard block
 block discarded – undo
30 30
 
31 31
     private static function create()
32 32
     {
33
-        Event::listen('cb.dataInserted', function (string $table, int $id, string $time, CbUser $user) {
33
+        Event::listen('cb.dataInserted', function(string $table, int $id, string $time, CbUser $user) {
34 34
             self::insertLog("Data inserted into $table table with Id: $id at $time", $user->id);
35 35
         });
36 36
     }
37 37
 
38 38
     private static function update()
39 39
     {
40
-        Event::listen('cb.dataUpdated', function (string $table, int $id, string $time, CbUser $user) {
40
+        Event::listen('cb.dataUpdated', function(string $table, int $id, string $time, CbUser $user) {
41 41
             self::insertLog("Data updated within $table table with Id: $id at $time", $user->id);
42 42
         });
43 43
     }
44 44
 
45 45
     private static function deleteImage()
46 46
     {
47
-        Event::listen('cb.imageDeleted', function (string $table, array $prop, string $time, CbUser $user) {
47
+        Event::listen('cb.imageDeleted', function(string $table, array $prop, string $time, CbUser $user) {
48 48
             $file = $prop['file'];
49 49
             $id = $prop['id'];
50 50
             self::insertLog("($file) Image deleted from $table table with Id: $id at $time", $user->id);
Please login to merge, or discard this patch.