Completed
Push — develop ( a73e2c...030f10 )
by Carsten
28:43 queued 13:31
created
module/Auth/src/Auth/Form/SocialProfiles.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -61,14 +61,14 @@
 block discarded – undo
61 61
         return $this->useDefaultValidation ? \Zend\Form\Form::isValid() : parent::isValid();
62 62
     }
63 63
     
64
-	/**
65
-	 * @param bool $bool
66
-	 * @return SocialProfiles
67
-	 */
68
-	public function setUseDefaultValidation($bool)
69
-	{
70
-		$this->useDefaultValidation = (bool)$bool;
64
+    /**
65
+     * @param bool $bool
66
+     * @return SocialProfiles
67
+     */
68
+    public function setUseDefaultValidation($bool)
69
+    {
70
+        $this->useDefaultValidation = (bool)$bool;
71 71
 		
72
-		return $this;
73
-	}
72
+        return $this;
73
+    }
74 74
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 	 */
68 68
 	public function setUseDefaultValidation($bool)
69 69
 	{
70
-		$this->useDefaultValidation = (bool)$bool;
70
+		$this->useDefaultValidation = (bool) $bool;
71 71
 		
72 72
 		return $this;
73 73
 	}
Please login to merge, or discard this patch.
module/Auth/src/Auth/Controller/ManageController.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,7 @@
 block discarded – undo
96 96
                     'content' => $content,
97 97
                     )
98 98
                 );
99
-            }
100
-            elseif ($postProfiles) {
99
+            } elseif ($postProfiles) {
101 100
                 $formSocialProfiles->setData($this->params()->fromPost());
102 101
                 
103 102
                 if ($formSocialProfiles->isValid()) {
Please login to merge, or discard this patch.
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -28,66 +28,66 @@  discard block
 block discarded – undo
28 28
  */
29 29
 class ManageController extends AbstractActionController
30 30
 {
31
-	private $userProfileContainer;
31
+    private $userProfileContainer;
32 32
 	
33
-	private $authService;
33
+    private $authService;
34 34
 	
35
-	private $socialProfileForm;
35
+    private $socialProfileForm;
36 36
 	
37
-	private $translator;
37
+    private $translator;
38 38
 	
39
-	private $repositories;
39
+    private $repositories;
40 40
 	
41
-	private $viewHelper;
41
+    private $viewHelper;
42 42
 	
43
-	private $hybridAuthAdapter;
43
+    private $hybridAuthAdapter;
44 44
 	
45
-	/**
46
-	 * @param ContainerInterface $container
47
-	 * @return ManageController
48
-	 */
49
-	static public function factory(ContainerInterface $container)
50
-	{
51
-		$forms = $container->get('forms');
52
-		$userProfileContainer = $forms->get('Auth/UserProfileContainer');
53
-		$socialProfileForm = $forms->get('Auth/SocialProfiles');
54
-		$authService = $container->get('AuthenticationService');
55
-		$translator = $container->get('translator');
56
-		$repositories = $container->get('repositories');
57
-		$viewHelper = $container->get('ViewHelperManager');
58
-		$hybridAuthAdapter = $container->get('HybridAuthAdapter');
59
-		$controller = new ManageController(
60
-			$userProfileContainer,
61
-			$authService,
62
-			$repositories,
63
-			$socialProfileForm,
64
-			$translator,
65
-			$viewHelper,
66
-			$hybridAuthAdapter
67
-		);
68
-		return $controller;
69
-	}
45
+    /**
46
+     * @param ContainerInterface $container
47
+     * @return ManageController
48
+     */
49
+    static public function factory(ContainerInterface $container)
50
+    {
51
+        $forms = $container->get('forms');
52
+        $userProfileContainer = $forms->get('Auth/UserProfileContainer');
53
+        $socialProfileForm = $forms->get('Auth/SocialProfiles');
54
+        $authService = $container->get('AuthenticationService');
55
+        $translator = $container->get('translator');
56
+        $repositories = $container->get('repositories');
57
+        $viewHelper = $container->get('ViewHelperManager');
58
+        $hybridAuthAdapter = $container->get('HybridAuthAdapter');
59
+        $controller = new ManageController(
60
+            $userProfileContainer,
61
+            $authService,
62
+            $repositories,
63
+            $socialProfileForm,
64
+            $translator,
65
+            $viewHelper,
66
+            $hybridAuthAdapter
67
+        );
68
+        return $controller;
69
+    }
70 70
 	
71
-	public function __construct(
72
-		UserProfileContainer $userProfileContainer,
73
-		AuthenticationService $authService,
74
-		RepositoryService $repositories,
75
-		SocialProfiles $socialProfileForm,
76
-		Translator $translator,
77
-		HelperPluginManager $viewHelper,
78
-		HybridAuth $hybridAuthAdapter
79
-	)
80
-	{
81
-		$this->userProfileContainer = $userProfileContainer;
82
-		$this->authService = $authService;
83
-		$this->socialProfileForm = $socialProfileForm;
84
-		$this->repositories = $repositories;
85
-		$this->translator = $translator;
86
-		$this->viewHelper = $viewHelper;
87
-		$this->hybridAuthAdapter = $hybridAuthAdapter;
88
-	}
71
+    public function __construct(
72
+        UserProfileContainer $userProfileContainer,
73
+        AuthenticationService $authService,
74
+        RepositoryService $repositories,
75
+        SocialProfiles $socialProfileForm,
76
+        Translator $translator,
77
+        HelperPluginManager $viewHelper,
78
+        HybridAuth $hybridAuthAdapter
79
+    )
80
+    {
81
+        $this->userProfileContainer = $userProfileContainer;
82
+        $this->authService = $authService;
83
+        $this->socialProfileForm = $socialProfileForm;
84
+        $this->repositories = $repositories;
85
+        $this->translator = $translator;
86
+        $this->viewHelper = $viewHelper;
87
+        $this->hybridAuthAdapter = $hybridAuthAdapter;
88
+    }
89 89
 	
90
-	/**
90
+    /**
91 91
      * @return array|JsonModel
92 92
      */
93 93
     public function profileAction()
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 $postData  = $form->getOption('use_post_array') ? $_POST : array();
122 122
                 //@TODO: [ZF3] option use_files_array is false by default
123 123
                 //$filesData = $form->getOption('use_files_array') ? $_FILES : array();
124
-	            $filesData = $_FILES;
124
+                $filesData = $_FILES;
125 125
                 $data      = array_merge($postData, $filesData);
126 126
                 $form->setData($data);
127 127
                 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
         /* @var \Auth\Form\UserProfileContainer $userProfileContainer */
96 96
         $userProfileContainer = $this->userProfileContainer;
97 97
         $user = $this->authService->getUser(); /* @var $user \Auth\Entity\User */
98
-        $postProfiles = (array)$this->params()->fromPost('social_profiles');
98
+        $postProfiles = (array) $this->params()->fromPost('social_profiles');
99 99
         $userProfiles = $user->getProfile();
100 100
         $formSocialProfiles = $this->socialProfileForm
101 101
             ->setUseDefaultValidation(true)
102
-            ->setData(['social_profiles' => array_map(function ($array)
102
+            ->setData(['social_profiles' => array_map(function($array)
103 103
             {
104 104
                 return $array['data'];
105 105
             }, $userProfiles)]);
@@ -118,11 +118,11 @@  discard block
 block discarded – undo
118 118
             $form      = $userProfileContainer->getForm($formName);
119 119
             
120 120
             if ($form) {
121
-                $postData  = $form->getOption('use_post_array') ? $_POST : array();
121
+                $postData = $form->getOption('use_post_array') ? $_POST : array();
122 122
                 //@TODO: [ZF3] option use_files_array is false by default
123 123
                 //$filesData = $form->getOption('use_files_array') ? $_FILES : array();
124 124
 	            $filesData = $_FILES;
125
-                $data      = array_merge($postData, $filesData);
125
+                $data = array_merge($postData, $filesData);
126 126
                 $form->setData($data);
127 127
                 
128 128
                 if (!$form->isValid()) {
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
                                 ));
184 184
                             } else {
185 185
                                 $profile = [
186
-                                    'auth' => (array)$authProfile,
186
+                                    'auth' => (array) $authProfile,
187 187
                                     'data' => \Zend\Json\Json::decode($dataProfiles[$network])
188 188
                                 ];
189 189
                                 $user->addProfile($network, $profile);
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                 }
194 194
                 
195 195
                 // keep data in sync & properly decoded
196
-                $formSocialProfiles->setData(['social_profiles' => array_map(function ($array)
196
+                $formSocialProfiles->setData(['social_profiles' => array_map(function($array)
197 197
                 {
198 198
                     return \Zend\Json\Json::decode($array) ?: '';
199 199
                 }, $dataProfiles)]);
Please login to merge, or discard this patch.
module/Auth/src/Auth/Controller/IndexController.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -411,8 +411,7 @@
 block discarded – undo
411 411
                     } else {
412 412
                         $notFoundUsers[] = $grp_member . $loginSuffix;
413 413
                     }
414
-                }
415
-                catch (\Auth\Exception\UserDeactivatedException $e)
414
+                } catch (\Auth\Exception\UserDeactivatedException $e)
416 415
                 {
417 416
                     $notFoundUsers[] = $grp_member . $loginSuffix;
418 417
                 }
Please login to merge, or discard this patch.
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -70,28 +70,28 @@
 block discarded – undo
70 70
     
71 71
     protected $externalAdapter;
72 72
     
73
-	/**
74
-	 * IndexController constructor.
75
-	 *
76
-	 * @param AuthenticationService $auth
77
-	 * @param LoggerInterface $logger
78
-	 * @param $userLoginAdapter
79
-	 * @param $locale
80
-	 * @param $urlHelper
81
-	 * @param array $forms
82
-	 * @param $options
83
-	 */
73
+    /**
74
+     * IndexController constructor.
75
+     *
76
+     * @param AuthenticationService $auth
77
+     * @param LoggerInterface $logger
78
+     * @param $userLoginAdapter
79
+     * @param $locale
80
+     * @param $urlHelper
81
+     * @param array $forms
82
+     * @param $options
83
+     */
84 84
     public function __construct(
85
-    	AuthenticationService $auth,
86
-	    LoggerInterface $logger,
87
-	    $userLoginAdapter,
88
-	    $locale,
89
-	    $urlHelper,
90
-	    array $forms,
91
-	    $options,
92
-		$hybridAuthAdapter,
93
-		$externalAdapter,
94
-		RepositoryService $repositories
85
+        AuthenticationService $auth,
86
+        LoggerInterface $logger,
87
+        $userLoginAdapter,
88
+        $locale,
89
+        $urlHelper,
90
+        array $forms,
91
+        $options,
92
+        $hybridAuthAdapter,
93
+        $externalAdapter,
94
+        RepositoryService $repositories
95 95
     )
96 96
     {
97 97
         $this->auth              = $auth;
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
 class IndexController extends AbstractActionController
36 36
 {
37 37
 
38
-    const LOGIN='login';
39
-    const REGISTER='register';
38
+    const LOGIN = 'login';
39
+    const REGISTER = 'register';
40 40
 
41 41
     /**
42 42
      * @var AuthenticationService
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $registerForm = $this->forms[self::REGISTER];
125 125
 
126 126
         /* @var $request \Zend\Http\Request */
127
-        $request   = $this->getRequest();
127
+        $request = $this->getRequest();
128 128
 
129 129
         if ($request->isPost()) {
130 130
             $data                          = $this->params()->fromPost();
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             if (array_key_exists('credentials', $data) &&
143 143
                 array_key_exists('login', $data['credentials']) &&
144 144
                 array_key_exists('credential', $data['credentials'])) {
145
-                $adapter->setIdentity($data['credentials']['login'] . $loginSuffix)
145
+                $adapter->setIdentity($data['credentials']['login'].$loginSuffix)
146 146
                     ->setCredential($data['credentials']['credential']);
147 147
             }
148 148
             
@@ -153,14 +153,14 @@  discard block
 block discarded – undo
153 153
             if ($result->isValid()) {
154 154
                 $user = $auth->getUser();
155 155
                 $language = $this->locale->detectLanguage($request, $user);
156
-                $this->logger->info('User ' . $user->getLogin() . ' logged in');
156
+                $this->logger->info('User '.$user->getLogin().' logged in');
157 157
                 
158 158
                 $ref = $this->params()->fromQuery('ref', false);
159 159
 
160 160
                 if ($ref) {
161 161
                     $ref = urldecode($ref);
162
-                    $url = preg_replace('~/[a-z]{2}(/|$)~', '/' . $language . '$1', $ref);
163
-                    $url = $request->getBasePath() . $url;
162
+                    $url = preg_replace('~/[a-z]{2}(/|$)~', '/'.$language.'$1', $ref);
163
+                    $url = $request->getBasePath().$url;
164 164
                 } else {
165 165
                     $urlHelper = $this->viewHelperManager->get('url');
166 166
                     $url = $urlHelper('lang', array('lang' => $language));
@@ -170,9 +170,9 @@  discard block
 block discarded – undo
170 170
             } else {
171 171
                 $loginName = $data['credentials']['login'];
172 172
                 if (!empty($loginSuffix)) {
173
-                    $loginName = $loginName . ' (' . $loginName . $loginSuffix . ')';
173
+                    $loginName = $loginName.' ('.$loginName.$loginSuffix.')';
174 174
                 }
175
-                $this->logger->info('Failed to authenticate User ' . $loginName);
175
+                $this->logger->info('Failed to authenticate User '.$loginName);
176 176
                 $this->notification()->danger(/*@translate*/ 'Authentication failed.');
177 177
             }
178 178
         }
@@ -232,9 +232,9 @@  discard block
 block discarded – undo
232 232
             try {
233 233
                 $user          = $auth->getUser();
234 234
                 $password      = substr(md5(uniqid()), 0, 6);
235
-                $login         = uniqid() . ($this->options->auth_suffix != "" ? '@' . $this->options->auth_suffix : '');
235
+                $login         = uniqid().($this->options->auth_suffix != "" ? '@'.$this->options->auth_suffix : '');
236 236
                 $externalLogin = $user->getLogin() ?: '-- not communicated --';
237
-                $this->logger->debug('first login via ' . $provider . ' as: ' . $externalLogin);
237
+                $this->logger->debug('first login via '.$provider.' as: '.$externalLogin);
238 238
 
239 239
                 $user->setLogin($login);
240 240
                 $user->setPassword($password);
@@ -253,11 +253,11 @@  discard block
 block discarded – undo
253 253
                 );
254 254
                 $mail->addTo($user->getInfo()->getEmail());
255 255
 
256
-                $loggerId = $login . ' (' . $provider . ': ' . $externalLogin . ')';
256
+                $loggerId = $login.' ('.$provider.': '.$externalLogin.')';
257 257
                 if (isset($mail) && $this->mailer($mail)) {
258
-                    $this->logger->info('Mail first-login for ' . $loggerId . ' sent to ' . $user->getInfo()->getEmail());
258
+                    $this->logger->info('Mail first-login for '.$loggerId.' sent to '.$user->getInfo()->getEmail());
259 259
                 } else {
260
-                    $this->logger->warn('No Mail was sent for ' . $loggerId);
260
+                    $this->logger->warn('No Mail was sent for '.$loggerId);
261 261
                 }
262 262
             } catch (\Exception $e) {
263 263
                 $this->logger->crit($e);
@@ -268,11 +268,11 @@  discard block
 block discarded – undo
268 268
         }
269 269
         
270 270
         $user = $auth->getUser();
271
-        $this->logger->info('User ' . $auth->getUser()->getInfo()->getDisplayName() . ' logged in via ' . $provider);
271
+        $this->logger->info('User '.$auth->getUser()->getInfo()->getDisplayName().' logged in via '.$provider);
272 272
         $settings = $user->getSettings('Core');
273 273
         if (null !== $settings->localization->language) {
274 274
             $basePath = $this->getRequest()->getBasePath();
275
-            $ref = preg_replace('~^'.$basePath . '/[a-z]{2}(?=/|$)~', $basePath . '/' . $settings->localization->language, $ref);
275
+            $ref = preg_replace('~^'.$basePath.'/[a-z]{2}(?=/|$)~', $basePath.'/'.$settings->localization->language, $ref);
276 276
         }
277 277
         return $this->redirect()->toUrl($ref);
278 278
     }
@@ -303,8 +303,8 @@  discard block
 block discarded – undo
303 303
         
304 304
         if ($result->isValid()) {
305 305
             $this->logger->info(
306
-                'User ' . $this->params()->fromPost('user') .
307
-                ' logged via ' . $appKey
306
+                'User '.$this->params()->fromPost('user').
307
+                ' logged via '.$appKey
308 308
             );
309 309
             
310 310
             // the external login may include some parameters for an update
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
             if (array_key_exists('firstLogin', $resultMessage) && $resultMessage['firstLogin'] === true) {
336 336
                 // first external Login
337 337
                 $userName = $this->params()->fromPost('user');
338
-                $this->logger->debug('first login for User: ' .  $userName);
338
+                $this->logger->debug('first login for User: '.$userName);
339 339
                 //
340 340
                 if (preg_match('/^(.*)@\w+$/', $userName, $realUserName)) {
341 341
                     $userName = $realUserName[1];
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 
360 360
                 try {
361 361
                     $this->mailer($mail);
362
-                    $this->logger->info('Mail first-login sent to ' . $userName);
362
+                    $this->logger->info('Mail first-login sent to '.$userName);
363 363
                 } catch (\Zend\Mail\Transport\Exception\ExceptionInterface $e) {
364 364
                     $this->logger->warn('No Mail was sent');
365 365
                     $this->logger->debug($e);
@@ -374,8 +374,8 @@  discard block
 block discarded – undo
374 374
             );
375 375
         } else {
376 376
             $this->logger->info(
377
-                'Failed to authenticate User ' . $this->params()->fromPost('user') .
378
-                ' via ' . $this->params()->fromPost('appKey')
377
+                'Failed to authenticate User '.$this->params()->fromPost('user').
378
+                ' via '.$this->params()->fromPost('appKey')
379 379
             );
380 380
             
381 381
             $this->getResponse()->setStatusCode(Response::STATUS_CODE_401);
@@ -400,8 +400,8 @@  discard block
 block discarded – undo
400 400
                 array(
401 401
                 'format' => 'json',
402 402
                     'group' => array(
403
-                        0 => 'testuser4711', 1 => 'flatscreen', 2 => 'flatscreen1', 3 => 'flatscreen2', 4 => 'flatscreen3',  5 => 'flatscreen4',
404
-                        6 => 'flatscreen5', 7 => 'flatscreen6', 8 => 'flatscreen7',  9 => 'flatscreen8', 10 => 'flatscreen9'
403
+                        0 => 'testuser4711', 1 => 'flatscreen', 2 => 'flatscreen1', 3 => 'flatscreen2', 4 => 'flatscreen3', 5 => 'flatscreen4',
404
+                        6 => 'flatscreen5', 7 => 'flatscreen6', 8 => 'flatscreen7', 9 => 'flatscreen8', 10 => 'flatscreen9'
405 405
                     ),
406 406
                     'name' => '(die) Rauscher – Unternehmensberatung & Consulting',
407 407
                 )
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
         }
411 411
         $auth = $this->auth;
412 412
         $userGrpAdmin = $auth->getUser();
413
-        $this->logger->info('User ' . $auth->getUser()->getInfo()->getDisplayName());
413
+        $this->logger->info('User '.$auth->getUser()->getInfo()->getDisplayName());
414 414
         $grp = $this->params()->fromQuery('group');
415 415
         
416 416
         // if the request is made by an external host, add his identification-key to the name
@@ -431,16 +431,16 @@  discard block
 block discarded – undo
431 431
             foreach ($params->group as $grp_member) {
432 432
                 try
433 433
                 {
434
-                    $user = $users->findByLogin($grp_member . $loginSuffix);
434
+                    $user = $users->findByLogin($grp_member.$loginSuffix);
435 435
                     if (!empty($user)) {
436 436
                         $groupUserId[] = $user->id;
437 437
                     } else {
438
-                        $notFoundUsers[] = $grp_member . $loginSuffix;
438
+                        $notFoundUsers[] = $grp_member.$loginSuffix;
439 439
                     }
440 440
                 }
441 441
                 catch (\Auth\Exception\UserDeactivatedException $e)
442 442
                 {
443
-                    $notFoundUsers[] = $grp_member . $loginSuffix;
443
+                    $notFoundUsers[] = $grp_member.$loginSuffix;
444 444
                 }
445 445
             }
446 446
         }
@@ -450,9 +450,9 @@  discard block
 block discarded – undo
450 450
             $group->setUsers($groupUserId);
451 451
         }
452 452
         $this->logger->info(
453
-            'Update Group Name: ' . $name . PHP_EOL . str_repeat(' ', 36) . 'Group Owner: ' . $userGrpAdmin->getLogin() . PHP_EOL .
454
-            str_repeat(' ', 36) . 'Group Members Param: ' . implode(',', $params->group) . PHP_EOL .
455
-            str_repeat(' ', 36) . 'Group Members: ' . count($groupUserId) . PHP_EOL . str_repeat(' ', 36) . 'Group Members not found: ' . implode(',', $notFoundUsers)
453
+            'Update Group Name: '.$name.PHP_EOL.str_repeat(' ', 36).'Group Owner: '.$userGrpAdmin->getLogin().PHP_EOL.
454
+            str_repeat(' ', 36).'Group Members Param: '.implode(',', $params->group).PHP_EOL.
455
+            str_repeat(' ', 36).'Group Members: '.count($groupUserId).PHP_EOL.str_repeat(' ', 36).'Group Members not found: '.implode(',', $notFoundUsers)
456 456
         );
457 457
         
458 458
         return new JsonModel(
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
     public function logoutAction()
470 470
     {
471 471
         $auth = $this->auth;
472
-        $this->logger->info('User ' . ($auth->getUser()->getLogin()==''?$auth->getUser()->getInfo()->getDisplayName():$auth->getUser()->getLogin()) . ' logged out');
472
+        $this->logger->info('User '.($auth->getUser()->getLogin() == '' ? $auth->getUser()->getInfo()->getDisplayName() : $auth->getUser()->getLogin()).' logged out');
473 473
         $auth->clearIdentity();
474 474
         unset($_SESSION['HA::STORE']);
475 475
 
Please login to merge, or discard this patch.
module/Auth/src/Auth/Listener/DeactivatedUserListener.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         ];
34 34
         
35 35
         // do nothing for allowed routes
36
-		if (in_array($routeName, $allowedRoutes))
36
+        if (in_array($routeName, $allowedRoutes))
37 37
         {
38 38
             return;
39 39
         }
Please login to merge, or discard this patch.
module/Auth/src/Auth/Entity/Status.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,10 +53,10 @@
 block discarded – undo
53 53
     public function __construct($status = self::ACTIVE)
54 54
     {
55 55
         if (!isset(static::$orderMap[$status])) {
56
-            throw new \DomainException('Unknown status: ' . $status);
56
+            throw new \DomainException('Unknown status: '.$status);
57 57
         }
58 58
         
59
-        $constant = 'self::' . strtoupper($status);
59
+        $constant = 'self::'.strtoupper($status);
60 60
         $this->name = constant($constant);
61 61
         $this->order = $this->getOrder();
62 62
     }
Please login to merge, or discard this patch.
module/Auth/src/Auth/Controller/UsersController.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,9 +84,9 @@
 block discarded – undo
84 84
         $imageStrategy = $infoContainer->getForm('info.image')
85 85
             ->getHydrator()
86 86
             ->getStrategy('image');
87
-		$fileEntity = $imageStrategy->getFileEntity();
88
-		$fileEntity->setUser($user);
89
-		$imageStrategy->setFileEntity($fileEntity);
87
+        $fileEntity = $imageStrategy->getFileEntity();
88
+        $fileEntity->setUser($user);
89
+        $imageStrategy->setFileEntity($fileEntity);
90 90
         
91 91
         if ($this->request->isPost()) {
92 92
             $formName = $params->fromQuery('form');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     /**
41 41
      * @param UserRepository $userRepository
42 42
      */
43
-    public function __construct(UserRepository $userRepository,$formManager,$viewHelper)
43
+    public function __construct(UserRepository $userRepository, $formManager, $viewHelper)
44 44
     {
45 45
         $this->userRepository = $userRepository;
46 46
         $this->formManager = $formManager;
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         }
187 187
 
188 188
         $switcher = $this->plugin('Auth/User/Switcher');
189
-        $success  = $switcher($this->params()->fromQuery('id'), [ 'ref' => urldecode($this->params()->fromQuery('ref')) ]);
189
+        $success  = $switcher($this->params()->fromQuery('id'), ['ref' => urldecode($this->params()->fromQuery('ref'))]);
190 190
 
191 191
         return new JsonModel(['success' => true]);
192 192
     }
Please login to merge, or discard this patch.
module/Auth/src/Auth/Controller/Plugin/LoginFilter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     public function __construct(LoginFilterService $loginFilter)
33 33
     {
34
-        $this->loginFilter = $loginFilter;;
34
+        $this->loginFilter = $loginFilter; ;
35 35
     }
36 36
 
37 37
     /**
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@
 block discarded – undo
44 44
     }
45 45
 	
46 46
 	
47
-	/**
48
-	 * @param ContainerInterface $container
49
-	 *
50
-	 * @return static
51
-	 */
47
+    /**
48
+     * @param ContainerInterface $container
49
+     *
50
+     * @return static
51
+     */
52 52
     public static function factory(ContainerInterface $container)
53 53
     {
54 54
         return new static($container->get('Auth/LoginFilter'));
Please login to merge, or discard this patch.
module/Auth/src/Auth/Listener/UnauthorizedAccessListener.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
         if ($exception instanceof UnauthorizedImageAccessException) {
58 58
             $image = __DIR__ . '/../../../../../public/images/unauthorized-access.png';
59 59
             $response->setStatusCode(Response::STATUS_CODE_403)
60
-                     ->setContent(file_get_contents($image))
61
-                     ->getHeaders()
62
-                     ->addHeaderLine('Content-Type', 'image/png');
60
+                        ->setContent(file_get_contents($image))
61
+                        ->getHeaders()
62
+                        ->addHeaderLine('Content-Type', 'image/png');
63 63
             $e->stopPropagation();
64 64
             $response->sendHeaders();
65 65
             //echo file_get_contents($image);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         }
71 71
         
72 72
         $application = $e->getApplication();
73
-		$auth = $application->getServiceManager()->get('AuthenticationService');
73
+        $auth = $application->getServiceManager()->get('AuthenticationService');
74 74
         
75 75
         if (!$auth->hasIdentity()) {
76 76
             $routeMatch = $e->getRouteMatch();
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
         $model->setTemplate($this->getExceptionTemplate());
103 103
         $e->setResult($model);
104 104
 
105
-       // $statusCode = $response->getStatusCode();
106
-       // if ($statusCode === 200) {
105
+        // $statusCode = $response->getStatusCode();
106
+        // if ($statusCode === 200) {
107 107
             $response->setStatusCode(Response::STATUS_CODE_403);
108
-       // }
108
+        // }
109 109
     }
110 110
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
          * Return an image, if an image was requested.
56 56
          */
57 57
         if ($exception instanceof UnauthorizedImageAccessException) {
58
-            $image = __DIR__ . '/../../../../../public/images/unauthorized-access.png';
58
+            $image = __DIR__.'/../../../../../public/images/unauthorized-access.png';
59 59
             $response->setStatusCode(Response::STATUS_CODE_403)
60 60
                      ->setContent(file_get_contents($image))
61 61
                      ->getHeaders()
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             $routeMatch->setParam('action', 'index');
79 79
             $query = $e->getRequest()->getQuery();
80 80
             $ref = $e->getRequest()->getRequestUri();
81
-            $ref = preg_replace('~^' . preg_quote($e->getRouter()->getBaseUrl()) . '~', '', $ref);
81
+            $ref = preg_replace('~^'.preg_quote($e->getRouter()->getBaseUrl()).'~', '', $ref);
82 82
             $query->set('ref', $ref);
83 83
             $query->set('req', 1);
84 84
             $response->setStatusCode(Response::STATUS_CODE_401);
Please login to merge, or discard this patch.
module/Auth/src/Auth/Dependency/Manager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 
57 57
     protected function attachDefaultListeners()
58 58
     {
59
-        $this->getEventManager()->attach(static::EVENT_REMOVE_ITEMS, function (EventInterface $event) {
59
+        $this->getEventManager()->attach(static::EVENT_REMOVE_ITEMS, function(EventInterface $event) {
60 60
             $user = $event->getParam('user');
61 61
             foreach ($this->getLists() as $list) {
62 62
                 foreach ($list->getEntities($user) as $entity) {
Please login to merge, or discard this patch.