Completed
Push — master ( 9a7125...f9bacd )
by Cheren
12:29 queued 10:39
created
src/Controller/UsersController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         }
44 44
 
45 45
         $this
46
-            ->set('user', $this->Users->get($userId, ['contain' => 'Groups']))
46
+            ->set('user', $this->Users->get($userId, [ 'contain' => 'Groups' ]))
47 47
             ->set('page_title', __d('community', 'Edit profile'));
48 48
     }
49 49
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
             $result = $this->Users->save($user);
77 77
             if ($result) {
78
-                EventManager::trigger('Controller.Users.successActivate', $this, ['user' => $result]);
78
+                EventManager::trigger('Controller.Users.successActivate', $this, [ 'user' => $result ]);
79 79
                 $this->Flash->success(__d(
80 80
                     'community',
81 81
                     '«{0}», you profile has been activate successfully.',
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             }
91 91
         }
92 92
 
93
-        return $this->redirect(['action' => 'login']);
93
+        return $this->redirect([ 'action' => 'login' ]);
94 94
     }
95 95
 
96 96
     /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             throw new BadRequestException(__d('community', 'User was not found'));
139 139
         }
140 140
 
141
-        if ($this->request->is(['patch', 'post', 'put'])) {
141
+        if ($this->request->is([ 'patch', 'post', 'put' ])) {
142 142
             $entity = $this->Users->patchEntity($user, $this->request->getData());
143 143
             if ($user->status) {
144 144
                 $entity->set('token', null);
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
                     ]);
162 162
                 }
163 163
 
164
-                return $this->redirect(['action' => 'login']);
164
+                return $this->redirect([ 'action' => 'login' ]);
165 165
             } else {
166 166
                 $this->Flash->error(__d('community', 'An error has occurred. Please, try again.'));
167 167
             }
Please login to merge, or discard this patch.
plugin.manifest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,21 +34,21 @@
 block discarded – undo
34 34
         'Community.UserEventHandler',
35 35
     ],
36 36
 
37
-    'Controller.initialize' => function (Controller $controller) {
37
+    'Controller.initialize' => function(Controller $controller) {
38 38
         $controller->loadComponent('Community.Auth');
39 39
         if ($controller->request->getParam('prefix') === 'admin') {
40 40
             $controller->loadComponent('Community.User');
41 41
         }
42 42
     },
43 43
 
44
-    'Controller.beforeFilter' => function (Controller $controller) {
44
+    'Controller.beforeFilter' => function(Controller $controller) {
45 45
         $user = new User((array) $controller->Auth->user());
46 46
         $controller->set('authorized', $user);
47 47
     },
48 48
 
49
-    'View.initialize' => function (AppView $view) {
49
+    'View.initialize' => function(AppView $view) {
50 50
         if ($view->request->getData('plugin') === 'Community') {
51
-            $view->Html->less(['Community.styles.less'], ['block' => true, 'fullBase' => true, 'force' => true]);
51
+            $view->Html->less([ 'Community.styles.less' ], [ 'block' => true, 'fullBase' => true, 'force' => true ]);
52 52
         }
53 53
     },
54 54
 
Please login to merge, or discard this patch.