Passed
Push — master ( a26db6...b381e6 )
by Björn
04:01 queued 11s
created
module/UIComponents/src/UIComponents/View/Helper/Utilities/AppTitle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function render($short = null)
44 44
     {
45
-        $config = new \Zend\Config\Config( $this->getServiceLocator()->getServiceLocator()->get('Config') );
45
+        $config = new \Zend\Config\Config($this->getServiceLocator()->getServiceLocator()->get('Config'));
46 46
         if ($short === true) {
47 47
             return $config->get('app')->get('short_title');
48 48
         }
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/Utilities/AppFavicon.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      */
42 42
     public function render($container = null)
43 43
     {
44
-        $config = new \Zend\Config\Config( $this->getServiceLocator()->getServiceLocator()->get('Config') );
44
+        $config = new \Zend\Config\Config($this->getServiceLocator()->getServiceLocator()->get('Config'));
45 45
         return $config->get('app')->get('favicon');
46 46
     }
47 47
     
Please login to merge, or discard this patch.
module/UIComponents/src/UIComponents/View/Helper/Utilities/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function render($container = null)
44 44
     {
45
-        $config = new \Zend\Config\Config( $this->getServiceLocator()->getServiceLocator()->get('Config') );
45
+        $config = new \Zend\Config\Config($this->getServiceLocator()->getServiceLocator()->get('Config'));
46 46
         return $config;
47 47
     }
48 48
     
Please login to merge, or discard this patch.
UIComponents/src/UIComponents/Framework/ClassnameCollectionAbstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
 	 * @see \Zend\Config\Config
119 119
 	 */
120 120
 	public function __contruct() {
121
-	    return new \Zend\Config\Config( get_object_vars($this) );
121
+	    return new \Zend\Config\Config(get_object_vars($this));
122 122
 	}
123 123
 		
124 124
 }
Please login to merge, or discard this patch.
module/Admin/src/Admin/Entity/User.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -125,30 +125,30 @@
 block discarded – undo
125 125
      */
126 126
     public function exchangeArray($data = array(), $forceEncryptPassword = false)
127 127
     {
128
-        if (isset($data['id']) && !empty($data["id"]) ) {
128
+        if (isset($data['id']) && !empty($data["id"])) {
129 129
             $this->id            = ($data['id']);
130 130
             $this->user_id        = ($data['id']);
131
-        } elseif (isset($data['user_id']) && !empty($data["user_id"]) ) {
131
+        } elseif (isset($data['user_id']) && !empty($data["user_id"])) {
132 132
             $this->id            = ($data['user_id']);
133 133
             $this->user_id        = ($data['user_id']);
134 134
         }
135
-        $this->username        = (isset($data['username'])) ? $data['username'] : $this->username;
136
-        $this->email        = (isset($data['email'])) ? $data['email'] : $this->email;
137
-        if (isset($data['displayName']) ) {
135
+        $this->username = (isset($data['username'])) ? $data['username'] : $this->username;
136
+        $this->email = (isset($data['email'])) ? $data['email'] : $this->email;
137
+        if (isset($data['displayName'])) {
138 138
             $this->display_name    = $data['displayName'];
139 139
             $this->displayName    = $data['displayName'];
140
-        } elseif (isset($data['display_name']) ) {
140
+        } elseif (isset($data['display_name'])) {
141 141
             $this->display_name    = $data['display_name'];
142 142
             $this->displayName    = $data['display_name'];
143 143
         }
144
-        if (isset($data["password"]) && $forceEncryptPassword ) {
144
+        if (isset($data["password"]) && $forceEncryptPassword) {
145 145
             $bcrypt = new Bcrypt;
146 146
             $bcrypt->setCost(null); // @TODO $this->getUserService()->getOptions()->getPasswordCost());
147 147
             $data["password"] = $bcrypt->create($data['password']);
148 148
         }
149
-        $this->password        = (isset($data['password'])) ? $data['password'] : $this->password;
149
+        $this->password = (isset($data['password'])) ? $data['password'] : $this->password;
150 150
         $this->state        = (isset($data['state'])) ? $data['state'] : $this->state;
151
-        $this->aclrole        = (isset($data['aclrole'])) ? $data['aclrole'] : $this->aclrole;
151
+        $this->aclrole = (isset($data['aclrole'])) ? $data['aclrole'] : $this->aclrole;
152 152
         $this->token        = (isset($data['token'])) ? $data['token'] : $this->token;
153 153
         
154 154
         return $this;
Please login to merge, or discard this patch.
module/Admin/src/Admin/Controller/UsersController.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
     {
79 79
         $tmplVars = $this->getTemplateVars();
80 80
         $aUserlist = $this->getUserTable()->fetchAll();
81
-        if ( $this->isXHR() ) {
81
+        if ($this->isXHR()) {
82 82
             $datatablesData = array('data' => $aUserlist->toArray());
83 83
             $oController = $this;
84 84
             $datatablesData['data'] = array_map(
85
-                function ($row) use ($oController) {
85
+                function($row) use ($oController) {
86 86
                     $actions = '<div class="button-group tiny btn-group btn-group-xs">'.
87 87
                     '<a class="button btn btn-default tiny btn-xs btn-clean btn-cta-xhr cta-xhr-modal" href="'.$oController->url()->fromRoute(
88 88
                         'admin/default',
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                 $user->exchangeArray($form->getData());
140 140
                 $this->getUserTable()->saveUser($user);
141 141
                 $this->flashMessenger()->addSuccessMessage($this->translate("user has been saved"));
142
-                if ( $this->isXHR() ) {
142
+                if ($this->isXHR()) {
143 143
                     $tmplVars["showForm"] = false;
144 144
                 } else {
145 145
                     return $this->redirect()->toRoute('admin/default', array('controller' => 'users'));
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             return $this->redirect()->toRoute('admin/default', array('controller' => 'users'));
176 176
         }
177 177
 
178
-        $form    = new UserForm();
178
+        $form = new UserForm();
179 179
         $form->bind($user);
180 180
 
181 181
         $roles = $this->getAclroleTable()->fetchAll()->toArray();
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
             if ($form->isValid()) {
193 193
                 $this->getUserTable()->saveUser($user);
194 194
                 $this->flashMessenger()->addSuccessMessage($this->translate("user has been saved"));
195
-                if ( $this->isXHR() ) {
195
+                if ($this->isXHR()) {
196 196
                     $tmplVars["showForm"] = false;
197 197
                 } else {
198 198
                     return $this->redirect()->toRoute('admin/default', array('controller' => 'users'));
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
                 $id = (int) $request->getPost('id');
241 241
                 $this->getUserTable()->deleteUser($id);
242 242
                 $this->flashMessenger()->addSuccessMessage($this->translate("user has been deleted"));
243
-                if ( $this->isXHR() ) {
243
+                if ($this->isXHR()) {
244 244
                     $tmplVars["showForm"] = false;
245 245
                 } else {
246 246
                     return $this->redirect()->toRoute('admin/default', array('controller' => 'users'));
@@ -265,23 +265,23 @@  discard block
 block discarded – undo
265 265
         $config = $this->getServiceLocator()->get('Config');
266 266
         $users = $this->getServiceLocator()->get('zfcuser_user_mapper');
267 267
         
268
-        $user_id    = $this->params()->fromRoute('user_id', '');
269
-        $token        = $this->params()->fromRoute('confirmtoken', '');
268
+        $user_id = $this->params()->fromRoute('user_id', '');
269
+        $token = $this->params()->fromRoute('confirmtoken', '');
270 270
         if (empty($user_id) || empty($token)) {
271 271
             $this->flashMessenger()->addWarningMessage($this->translate("missing parameters"));
272 272
             return $this->redirect()->toRoute($config["zfcuser_registration_redirect_route"], array());
273 273
         }
274 274
         
275
-        if (is_numeric($user_id) ) {
275
+        if (is_numeric($user_id)) {
276 276
             $oUser = $users->findById($user_id);
277 277
         } else {
278 278
             $oUser = $users->findByUsername($user_id);
279 279
         }
280
-        if (!$oUser ) {
280
+        if (!$oUser) {
281 281
             $this->flashMessenger()->addWarningMessage($this->translate("user could not be found"));
282 282
             return $this->redirect()->toRoute($config["zfcuser_registration_redirect_route"], array());
283 283
         }
284
-        if (($oUser->getState() != 0) || ($oUser->getToken() != $token) ) {
284
+        if (($oUser->getState() != 0) || ($oUser->getToken() != $token)) {
285 285
             $this->flashMessenger()->addWarningMessage($this->translate("confirmation token is invalid"));
286 286
             return $this->redirect()->toRoute($config["zfcuser_registration_redirect_route"], array());
287 287
         }
@@ -321,26 +321,26 @@  discard block
 block discarded – undo
321 321
             $this->params()->fromPost(),
322 322
             array()
323 323
         );
324
-        $config    = $this->getServiceLocator()->get('Config');
325
-        $users    = $this->getServiceLocator()->get('zfcuser_user_mapper');
324
+        $config = $this->getServiceLocator()->get('Config');
325
+        $users = $this->getServiceLocator()->get('zfcuser_user_mapper');
326 326
         
327
-        $user_id    = $this->params()->fromRoute('user_id', '');
328
-        $token        = $this->params()->fromRoute('activatetoken', '');
327
+        $user_id = $this->params()->fromRoute('user_id', '');
328
+        $token = $this->params()->fromRoute('activatetoken', '');
329 329
         if (empty($user_id) || empty($token)) {
330 330
             $this->flashMessenger()->addWarningMessage($this->translate("missing parameters"));
331 331
             return $this->redirect()->toRoute($config["zfcuser_registration_redirect_route"], array());
332 332
         }
333 333
 
334
-        if (is_numeric($user_id) ) {
334
+        if (is_numeric($user_id)) {
335 335
             $oUser = $users->findById($user_id);
336 336
         } else {
337 337
             $oUser = $users->findByUsername($user_id);
338 338
         }
339
-        if (!$oUser ) {
339
+        if (!$oUser) {
340 340
             $this->flashMessenger()->addWarningMessage($this->translate("user could not be found"));
341 341
             return $this->redirect()->toRoute($config["zfcuser_registration_redirect_route"], array());
342 342
         }
343
-        if (($oUser->getState() != 0) || ($oUser->getToken() != $token) ) {
343
+        if (($oUser->getState() != 0) || ($oUser->getToken() != $token)) {
344 344
             $this->flashMessenger()->addWarningMessage($this->translate("activation token is invalid"));
345 345
             return $this->redirect()->toRoute($config["zfcuser_registration_redirect_route"], array());
346 346
         }
Please login to merge, or discard this patch.
module/Admin/src/Admin/Controller/AclController.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     public function acldataAction()
214 214
     {
215
-        if ( $this->isXHR() ) {
215
+        if ($this->isXHR()) {
216 216
             $roles = $this->getAclroleTable()->fetchAll()->toArray();
217 217
             $resources = $this->getAclresourceTable()->fetchAll()->toArray();
218 218
             $acls = array();
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
             );
236 236
             $oController = $this;
237 237
             $datatablesData['data'] = array_map(
238
-                function ($row) use ($oController) {
238
+                function($row) use ($oController) {
239 239
                     $actions = '<div class="button-group tiny btn-group btn-group-xs">'.
240 240
                         (empty($row["acl_id"]) ? 
241 241
                             '<a class="button btn btn-default tiny btn-xs btn-clean btn-cta-xhr cta-xhr-modal" href="'.$oController->url()->fromRoute(
@@ -269,11 +269,11 @@  discard block
 block discarded – undo
269 269
     public function rolesAction()
270 270
     {
271 271
 
272
-        if ( $this->isXHR() ) {
272
+        if ($this->isXHR()) {
273 273
             $datatablesData = array('data' => $this->getAclroleTable()->fetchAll()->toArray());
274 274
             $oController = $this;
275 275
             $datatablesData['data'] = array_map(
276
-                function ($row) use ($oController) {
276
+                function($row) use ($oController) {
277 277
                     $actions = '<div class="button-group tiny btn-group btn-group-xs">'.
278 278
                         '<a class="button btn btn-default tiny btn-xs btn-clean btn-cta-xhr cta-xhr-modal" href="'.$oController->url()->fromRoute(
279 279
                             'admin/acledit',
@@ -305,11 +305,11 @@  discard block
 block discarded – undo
305 305
      */
306 306
     public function resourcesAction()
307 307
     {
308
-        if ( $this->isXHR() ) {
308
+        if ($this->isXHR()) {
309 309
             $datatablesData = array('data' => $this->getAclresourceTable()->fetchAll()->toArray());
310 310
             $oController = $this;
311 311
             $datatablesData['data'] = array_map(
312
-                function ($row) use ($oController) {
312
+                function($row) use ($oController) {
313 313
                     $actions = '<div class="button-group tiny btn-group btn-group-xs">'.
314 314
                     '<a class="button btn btn-default tiny btn-xs btn-clean btn-cta-xhr cta-xhr-modal" href="'.$oController->url()->fromRoute(
315 315
                         'admin/acledit',
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
                 
388 388
                 // Redirect to list of Acl
389 389
                 $this->flashMessenger()->addSuccessMessage($this->translate("permission has been saved"));
390
-                if ( $this->isXHR() ) {
390
+                if ($this->isXHR()) {
391 391
                     $tmplVars["showForm"] = false;
392 392
                 } else {
393 393
                     return $this->redirect()->toRoute('admin/acledit', array());
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
                 
467 467
                 // Redirect to list of Acl
468 468
                 $this->flashMessenger()->addSuccessMessage($this->translate("permission has been saved"));
469
-                if ( $this->isXHR() ) {
469
+                if ($this->isXHR()) {
470 470
                     $tmplVars["showForm"] = false;
471 471
                 } else {
472 472
                     return $this->redirect()->toRoute('admin/acledit', array());
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
             }
522 522
 
523 523
             // Redirect to list of albums
524
-            if ( $this->isXHR() ) {
524
+            if ($this->isXHR()) {
525 525
                 $tmplVars["showForm"] = false;
526 526
             } else {
527 527
                 return $this->redirect()->toRoute('admin/acledit', array());
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
                 
562 562
                 // Redirect to list of Acl
563 563
                 $this->flashMessenger()->addSuccessMessage($this->translate("role has been saved"));
564
-                if ( $this->isXHR() ) {
564
+                if ($this->isXHR()) {
565 565
                     $tmplVars["showForm"] = false;
566 566
                 } else {
567 567
                     return $this->redirect()->toRoute('admin/acledit', array('action' => 'roles'));
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
             return $this->redirect()->toRoute('admin/acledit', array('action' => 'roles'));
601 601
         }
602 602
 
603
-        $form  = new AclroleForm();
603
+        $form = new AclroleForm();
604 604
         $form->bind($Aclrole);
605 605
 
606 606
         $request = $this->getRequest();
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
                 
616 616
                 // Redirect to list of Acl
617 617
                 $this->flashMessenger()->addSuccessMessage($this->translate("role has been saved"));
618
-                if ( $this->isXHR() ) {
618
+                if ($this->isXHR()) {
619 619
                     $tmplVars["showForm"] = false;
620 620
                 } else {
621 621
                     return $this->redirect()->toRoute('admin/acledit', array('action' => 'roles'));
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
             }
672 672
 
673 673
             // Redirect to list of albums
674
-            if ( $this->isXHR() ) {
674
+            if ($this->isXHR()) {
675 675
                 $tmplVars["showForm"] = false;
676 676
             } else {
677 677
                 return $this->redirect()->toRoute('admin/acledit', array('action' => 'roles'));
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
                 
714 714
                 // Redirect to list of Acl
715 715
                 $this->flashMessenger()->addSuccessMessage($this->translate("resource has been saved"));
716
-                if ( $this->isXHR() ) {
716
+                if ($this->isXHR()) {
717 717
                     $tmplVars["showForm"] = false;
718 718
                 } else {
719 719
                     return $this->redirect()->toRoute('admin/acledit', array('action' => 'resources'));
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
             return $this->redirect()->toRoute('admin/acledit', array('action' => 'resources'));
753 753
         }
754 754
 
755
-        $form  = new AclresourceForm();
755
+        $form = new AclresourceForm();
756 756
         $form->bind($Aclresource);
757 757
 
758 758
         $request = $this->getRequest();
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
                 
768 768
                 // Redirect to list of Acl
769 769
                 $this->flashMessenger()->addSuccessMessage($this->translate("resource has been saved"));
770
-                if ( $this->isXHR() ) {
770
+                if ($this->isXHR()) {
771 771
                     $tmplVars["showForm"] = false;
772 772
                 } else {
773 773
                     return $this->redirect()->toRoute('admin/acledit', array('action' => 'resources'));
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
             }
825 825
             
826 826
             // Redirect to list of albums
827
-            if ( $this->isXHR() ) {
827
+            if ($this->isXHR()) {
828 828
                 $tmplVars["showForm"] = false;
829 829
             } else {
830 830
                 return $this->redirect()->toRoute('admin/acledit', array('action' => 'resources'));
@@ -839,8 +839,8 @@  discard block
 block discarded – undo
839 839
      * re-initialize, respectively clear ACL cache entries
840 840
      * @return self
841 841
      */
842
-    private function reinitACLCache () {
843
-        if ( \Application\Module::getService('CacheService') ) {
842
+    private function reinitACLCache() {
843
+        if (\Application\Module::getService('CacheService')) {
844 844
             \Application\Module::getService('CacheService')->removeItem('ACL');
845 845
             \Admin\Module::initACL($this->getServiceLocator());
846 846
         }
Please login to merge, or discard this patch.
module/Admin/src/Admin/Controller/ApplicationsController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,12 +83,12 @@  discard block
 block discarded – undo
83 83
         $dataObj = array();
84 84
         foreach ($aApplicationslist as $row) {
85 85
             $data[] = $row;
86
-            $dataObj[] = (object)$row;
86
+            $dataObj[] = (object) $row;
87 87
         }
88
-        if ( $this->isXHR() ) {
88
+        if ($this->isXHR()) {
89 89
             $datatablesData = array('data' => $data);
90 90
             $datatablesData['data'] = array_map(
91
-                function ($row) use ($oController) {
91
+                function($row) use ($oController) {
92 92
                     $actions = '<div class="button-group tiny btn-group btn-group-xs">'.
93 93
                     '<a class="button btn btn-default tiny btn-xs btn-clean btn-cta-xhr cta-xhr-modal" href="'.$oController->url()->fromRoute(
94 94
                         'admin/applicationsedit',
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 $applications->exchangeArray($form->getData());
144 144
                 $this->getApplicationsTable()->saveApplication($applications);
145 145
                 $this->flashMessenger()->addSuccessMessage($this->translate('application has been saved'));
146
-                if ( $this->isXHR() ) {
146
+                if ($this->isXHR()) {
147 147
                     $tmplVars["showForm"] = false;
148 148
                 } else {
149 149
                     return $this->redirect()->toRoute('admin/applicationsedit', array('action' => 'index'));
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
             return $this->redirect()->toRoute('admin/applicationsedit');
184 184
         }
185 185
 
186
-        $form  = new ApplicationsForm();
186
+        $form = new ApplicationsForm();
187 187
         $form->bind($applications);
188 188
 
189 189
         $clients = $this->getClientsTable()->fetchAll()->toArray();
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
             if ($form->isValid()) {
202 202
                 $this->getApplicationsTable()->saveApplication($applications);
203 203
                 $this->flashMessenger()->addSuccessMessage($this->translate("application has been saved"));
204
-                if ( $this->isXHR() ) {
204
+                if ($this->isXHR()) {
205 205
                     $tmplVars["showForm"] = false;
206 206
                 } else {
207 207
                     return $this->redirect()->toRoute('admin/applicationsedit', array('action' => 'index'));
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
                 $id = (int) $request->getPost('id');
250 250
                 $this->getApplicationsTable()->deleteApplication($id);
251 251
                 $this->flashMessenger()->addSuccessMessage($this->translate("application has been deleted"));
252
-                if ( $this->isXHR() ) {
252
+                if ($this->isXHR()) {
253 253
                     $tmplVars["showForm"] = false;
254 254
                 } else {
255 255
                     return $this->redirect()->toRoute('admin/applicationsedit', array('action' => 'index'));
Please login to merge, or discard this patch.
module/Admin/src/Admin/Controller/ZfcuserController.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -377,8 +377,8 @@  discard block
 block discarded – undo
377 377
         $request    = $this->getRequest();
378 378
         //$service    = $this->getUserService();
379 379
         $service    = \Application\Module::getService('zfcuser_user_service');
380
-        $form        = new RequestPasswordResetForm(null, $options);
381
-        $translator    = $this->getTranslator();
380
+        $form = new RequestPasswordResetForm(null, $options);
381
+        $translator = $this->getTranslator();
382 382
         
383 383
         // if password reset is disabled
384 384
         if (!$config['zfcuser']['enable_passwordreset']) {
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
             $redirect = false;
392 392
         }
393 393
 
394
-        $redirectUrl = $this->url()->fromRoute('userrequestpasswordreset') . ($redirect ? '?redirect=' . rawurlencode($redirect) : '');
394
+        $redirectUrl = $this->url()->fromRoute('userrequestpasswordreset').($redirect ? '?redirect='.rawurlencode($redirect) : '');
395 395
         
396 396
         if (!$request->isPost()) {
397 397
             return array(
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
             sprintf($translator->translate("password reset email has been sent to user '%s'"), $identity)
440 440
         );
441 441
         
442
-        return $this->redirect()->toUrl($this->url()->fromRoute($config["zfcuser_registration_redirect_route"]) . ($redirect ? '?redirect='. rawurlencode($redirect) : ''));
442
+        return $this->redirect()->toUrl($this->url()->fromRoute($config["zfcuser_registration_redirect_route"]).($redirect ? '?redirect='.rawurlencode($redirect) : ''));
443 443
             
444 444
     }
445 445
 
@@ -465,8 +465,8 @@  discard block
 block discarded – undo
465 465
         $request    = $this->getRequest();
466 466
         //$service    = $this->getUserService();
467 467
         $service    = \Application\Module::getService('zfcuser_user_service');
468
-        $form        = new ResetPasswordForm(null, $options);
469
-        $translator    = $this->getTranslator();
468
+        $form = new ResetPasswordForm(null, $options);
469
+        $translator = $this->getTranslator();
470 470
         
471 471
         // if password reset is disabled
472 472
         if (!$config['zfcuser']['enable_passwordreset']) {
@@ -479,9 +479,9 @@  discard block
 block discarded – undo
479 479
             $redirect = false;
480 480
         }
481 481
 
482
-        $redirectUrl = $this->url()->fromRoute(static::ROUTE_LOGIN) . ($redirect ? '?redirect=' . rawurlencode($redirect) : '');
482
+        $redirectUrl = $this->url()->fromRoute(static::ROUTE_LOGIN).($redirect ? '?redirect='.rawurlencode($redirect) : '');
483 483
         
484
-        if (!$request->isPost() ) {
484
+        if (!$request->isPost()) {
485 485
             
486 486
             $user = false;
487 487
             $userId = (int) $this->params()->fromRoute('user_id');
@@ -490,14 +490,14 @@  discard block
 block discarded – undo
490 490
             $userTable = \Application\Module::getService('zfcuser_user_mapper');
491 491
             $user = $userTable->findById($userId);
492 492
             
493
-            if (!$user ) {
493
+            if (!$user) {
494 494
                 $this->flashMessenger()->addWarningMessage(
495 495
                     sprintf($translator->translate("invalid request"), '')
496 496
                 );
497 497
                 return $this->redirect()->toUrl($redirectUrl);
498 498
             }
499 499
             
500
-            if (empty($resetToken) || ($resetToken != $user->getToken()) ) {
500
+            if (empty($resetToken) || ($resetToken != $user->getToken())) {
501 501
                 $this->flashMessenger()->addWarningMessage(
502 502
                     sprintf($translator->translate("invalid request"), '')
503 503
                 );
@@ -526,23 +526,23 @@  discard block
 block discarded – undo
526 526
         $userTable = \Application\Module::getService('zfcuser_user_mapper');
527 527
         $user = $userTable->findByEmail($userId);
528 528
             
529
-        if (!$user ) {
529
+        if (!$user) {
530 530
             $this->flashMessenger()->addWarningMessage(
531 531
                 sprintf($translator->translate("invalid request"), $userId)
532 532
             );
533 533
             return $this->redirect()->toUrl($redirectUrl);
534 534
         }
535 535
         
536
-        if (empty($resetToken) || ($resetToken != $user->getToken()) ) {
536
+        if (empty($resetToken) || ($resetToken != $user->getToken())) {
537 537
             $this->flashMessenger()->addWarningMessage(
538 538
                 sprintf($translator->translate("invalid request"), $resetToken)
539 539
             );
540 540
             return $this->redirect()->toUrl($redirectUrl);
541 541
         }
542 542
         
543
-        $form->setData((array)$this->params()->fromPost());
543
+        $form->setData((array) $this->params()->fromPost());
544 544
         
545
-        if (!$form->isValid() ) {
545
+        if (!$form->isValid()) {
546 546
             
547 547
             return array(
548 548
             'user' => $user,
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
             );
569 569
             return $this->redirect()->toUrl(
570 570
                 $this->url()->fromRoute($config["zfcuser_registration_redirect_route"]) 
571
-                . ($redirect ? '?redirect='. rawurlencode($redirect) : '')
571
+                . ($redirect ? '?redirect='.rawurlencode($redirect) : '')
572 572
             );
573 573
             
574 574
         }
@@ -603,11 +603,11 @@  discard block
 block discarded – undo
603 603
             return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute());
604 604
         }
605 605
         
606
-        $form        = new UserDataForm();
607
-        $translator    = $this->getTranslator();
606
+        $form = new UserDataForm();
607
+        $translator = $this->getTranslator();
608 608
         
609 609
         /** @var \Admin\Entity\User $oIdentity */
610
-        $oIdentity        = $this->zfcUserAuthentication()->getIdentity();
610
+        $oIdentity = $this->zfcUserAuthentication()->getIdentity();
611 611
         /** @var \Admin\Model\UserData $oUser */
612 612
         $oUser         = new \Admin\Model\UserData();
613 613
         
@@ -616,7 +616,7 @@  discard block
 block discarded – undo
616 616
 
617 617
         $form->bind($oUser);
618 618
     
619
-        if (!$this->getRequest()->isPost() ) {
619
+        if (!$this->getRequest()->isPost()) {
620 620
             
621 621
             return new ViewModel(
622 622
                 array(
@@ -629,10 +629,10 @@  discard block
 block discarded – undo
629 629
             
630 630
         }
631 631
         
632
-        $data = (array)$this->params()->fromPost();
632
+        $data = (array) $this->params()->fromPost();
633 633
         $form->setData($data);
634 634
         
635
-        if (!$form->isValid() ) {
635
+        if (!$form->isValid()) {
636 636
             
637 637
             $this->flashMessenger()->addWarningMessage(
638 638
                 $translator->translate("user data could not be changed")
@@ -658,7 +658,7 @@  discard block
 block discarded – undo
658 658
                 $translator->translate("user data has been changed")
659 659
             );
660 660
 
661
-            if ($this->getRequest()->isXmlHttpRequest() ) {
661
+            if ($this->getRequest()->isXmlHttpRequest()) {
662 662
                 return new ViewModel(
663 663
                     array(
664 664
                     'showForm'      => false,
@@ -688,19 +688,19 @@  discard block
 block discarded – undo
688 688
             return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute());
689 689
         }
690 690
         
691
-        $form        = new UserProfileForm();
692
-        $translator    = $this->getTranslator();
691
+        $form = new UserProfileForm();
692
+        $translator = $this->getTranslator();
693 693
         /**
694 694
          * @var \Zend\Http\PhpEnvironment\Request|\Zend\Http\Request $request
695 695
          */
696 696
         $request    = $this->getRequest();
697
-        $user        = $this->zfcUserAuthentication()->getIdentity();
698
-        $userId        = (int) $user->getId();
697
+        $user = $this->zfcUserAuthentication()->getIdentity();
698
+        $userId = (int) $user->getId();
699 699
         $profile    = new UserProfile;
700 700
         $profile->load($userId);
701 701
         $form->bind($profile);
702 702
         
703
-        if (!$this->getRequest()->isPost() ) {
703
+        if (!$this->getRequest()->isPost()) {
704 704
             
705 705
             return array(
706 706
                 'showForm'        => true,
@@ -711,10 +711,10 @@  discard block
 block discarded – undo
711 711
             
712 712
         }
713 713
         
714
-        $data = (array)$this->params()->fromPost();
714
+        $data = (array) $this->params()->fromPost();
715 715
         $form->setData($data);
716 716
         
717
-        if (!$form->isValid() ) {
717
+        if (!$form->isValid()) {
718 718
             
719 719
             $this->flashMessenger()->addWarningMessage(
720 720
                 $translator->translate("user profile data could not be changed")
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
                 $translator->translate("user profile data has been changed")
736 736
             );
737 737
             
738
-            if ($request->isXmlHttpRequest() ) {
738
+            if ($request->isXmlHttpRequest()) {
739 739
                 $response = array(
740 740
                     'showForm'          => false,
741 741
                     'user'                => $user,
Please login to merge, or discard this patch.