Completed
Push — develop ( dbf1eb...cd67db )
by
unknown
13:06
created
module/Auth/src/Auth/Controller/IndexController.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * YAWIK
4
- *
5
- * @filesource
6
- * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
- * @license   MIT
8
- */
3
+     * YAWIK
4
+     *
5
+     * @filesource
6
+     * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
+     * @license   MIT
8
+     */
9 9
 
10 10
 /** Auth controller */
11 11
 namespace Auth\Controller;
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
     {
353 353
         //$adapter = $this->getServiceLocator()->get('ExternalApplicationAdapter');
354 354
         if (false) {
355
-             $this->request->setMethod('get');
355
+                $this->request->setMethod('get');
356 356
             $params = new Parameters(
357 357
                 array(
358 358
                 'format' => 'json',
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function __construct(AuthenticationService $auth, LoggerInterface $logger, $loginForm, $options)
54 54
     {
55
-        $this->auth=$auth;
56
-        $this->loginForm=$loginForm;
57
-        $this->logger=$logger;
55
+        $this->auth = $auth;
56
+        $this->loginForm = $loginForm;
57
+        $this->logger = $logger;
58 58
         $this->options = $options;
59 59
     }
60 60
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
                     $headers = $this->getRequest()->getHeaders();
104 104
                     if ($headers->has('Accept-Language')) {
105 105
                         $locales = $headers->get('Accept-Language')->getPrioritized();
106
-                        $language  = $locales[0]->type;
106
+                        $language = $locales[0]->type;
107 107
                     } else {
108 108
                         $language = 'en';
109 109
                     }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
                 if (!empty($loginSuffix)) {
129 129
                     $loginName = $loginName . ' (' . $loginName . $loginSuffix . ')';
130 130
                 }
131
-                $this->logger->info('Failed to authenticate User ' . $loginName );
131
+                $this->logger->info('Failed to authenticate User ' . $loginName);
132 132
                 $this->notification()->danger(/*@translate*/ 'Authentication failed.');
133 133
             }
134 134
         }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
      */
170 170
     public function loginAction()
171 171
     {
172
-        $ref = urldecode($this->getRequest()->getBasePath().$this->params()->fromQuery('ref'));
172
+        $ref = urldecode($this->getRequest()->getBasePath() . $this->params()->fromQuery('ref'));
173 173
         $provider = $this->params('provider', '--keiner--');
174 174
         $hauth = $this->getServiceLocator()->get('HybridAuthAdapter');
175 175
         $hauth->setProvider($provider);
@@ -182,10 +182,10 @@  discard block
 block discarded – undo
182 182
                 $user          = $auth->getUser();
183 183
                 $password      = substr(md5(uniqid()), 0, 6);
184 184
                 $login         = uniqid() . ($this->options->auth_suffix != "" ? '@' . $this->options->auth_suffix : '');
185
-                $externalLogin = isset($user->login)?$user->login:'-- not communicated --';
185
+                $externalLogin = isset($user->login) ? $user->login : '-- not communicated --';
186 186
                 $this->logger->debug('first login via ' . $provider . ' as: ' . $externalLogin);
187 187
 
188
-                $user->login=$login;
188
+                $user->login = $login;
189 189
                 $user->setPassword($password);
190 190
                 $user->role = $this->options->getRole();
191 191
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         $settings = $user->getSettings('Core');
222 222
         if (null !== $settings->localization->language) {
223 223
             $basePath = $this->getRequest()->getBasePath();
224
-            $ref = preg_replace('~^'.$basePath . '/[a-z]{2}(/)?~', $basePath . '/' . $settings->localization->language . '$1', $ref);
224
+            $ref = preg_replace('~^' . $basePath . '/[a-z]{2}(/)?~', $basePath . '/' . $settings->localization->language . '$1', $ref);
225 225
         }
226 226
         return $this->redirect()->toUrl($ref);
227 227
     }
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             if (array_key_exists('firstLogin', $resultMessage) && $resultMessage['firstLogin'] === true) {
286 286
                 // first external Login
287 287
                 $userName = $this->params()->fromPost('user');
288
-                $this->logger->debug('first login for User: ' .  $userName);
288
+                $this->logger->debug('first login for User: ' . $userName);
289 289
                 //
290 290
                 if (preg_match("/^(.*)@\w+$/", $userName, $realUserName)) {
291 291
                     $userName = $realUserName[1];
@@ -350,9 +350,9 @@  discard block
 block discarded – undo
350 350
             $params = new Parameters(
351 351
                 array(
352 352
                 'format' => 'json',
353
-                    'group' => array (
354
-                        0 => 'testuser4711', 1 => 'flatscreen', 2 => 'flatscreen1', 3 => 'flatscreen2', 4 => 'flatscreen3',  5 => 'flatscreen4',
355
-                        6 => 'flatscreen5', 7 => 'flatscreen6', 8 => 'flatscreen7',  9 => 'flatscreen8', 10 => 'flatscreen9'
353
+                    'group' => array(
354
+                        0 => 'testuser4711', 1 => 'flatscreen', 2 => 'flatscreen1', 3 => 'flatscreen2', 4 => 'flatscreen3', 5 => 'flatscreen4',
355
+                        6 => 'flatscreen5', 7 => 'flatscreen6', 8 => 'flatscreen7', 9 => 'flatscreen8', 10 => 'flatscreen9'
356 356
                     ),
357 357
                     'name' => '(die) Rauscher – Unternehmensberatung & Consulting',
358 358
                 )
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
     public function logoutAction()
415 415
     {
416 416
         $auth = $this->auth;
417
-        $this->logger->info('User ' . ($auth->getUser()->login==''?$auth->getUser()->info->displayName:$auth->getUser()->login) . ' logged out');
417
+        $this->logger->info('User ' . ($auth->getUser()->login == '' ? $auth->getUser()->info->displayName : $auth->getUser()->login) . ' logged out');
418 418
         $auth->clearIdentity();
419 419
         unset($_SESSION['HA::STORE']);
420 420
 
Please login to merge, or discard this patch.
module/Core/config/module.config.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * YAWIK
4
- * Configuration file of the Core module
5
- *
6
- * This file intents to provide the configuration for all other modules
7
- * as well (convention over configuration).
8
- * Having said that, you may always overwrite or extend the configuration
9
- * in your own modules configuration file(s) (or via the config autoloading).
10
- *
11
- * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
12
- * @license   MIT
13
- */
3
+     * YAWIK
4
+     * Configuration file of the Core module
5
+     *
6
+     * This file intents to provide the configuration for all other modules
7
+     * as well (convention over configuration).
8
+     * Having said that, you may always overwrite or extend the configuration
9
+     * in your own modules configuration file(s) (or via the config autoloading).
10
+     *
11
+     * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
12
+     * @license   MIT
13
+     */
14 14
 
15 15
 $doctrineConfig = include __DIR__ . '/doctrine.config.php';
16 16
 
@@ -32,24 +32,24 @@  discard block
 block discarded – undo
32 32
     'log' => array(
33 33
         'Core/Log' => array(
34 34
             'writers' => array(
35
-                 array(
36
-                     'name' => 'stream',
35
+                    array(
36
+                        'name' => 'stream',
37 37
                     'priority' => 1000,
38 38
                     'options' => array(
39
-                         'stream' => __DIR__ .'/../../../log/yawik.log',
39
+                            'stream' => __DIR__ .'/../../../log/yawik.log',
40
+                    ),
40 41
                     ),
41
-                 ),
42 42
             ),
43 43
         ),
44 44
         'Log/Core/Mail' => array(
45 45
             'writers' => array(
46
-                 array(
47
-                     'name' => 'stream',
46
+                    array(
47
+                        'name' => 'stream',
48 48
                     'priority' => 1000,
49 49
                     'options' => array(
50
-                         'stream' => __DIR__ .'/../../../log/mails.log',
50
+                            'stream' => __DIR__ .'/../../../log/mails.log',
51
+                    ),
51 52
                     ),
52
-                 ),
53 53
             ),
54 54
         ),
55 55
         'ErrorLogger' => array(
@@ -197,11 +197,11 @@  discard block
 block discarded – undo
197 197
     // Defines the Core/Navigation.
198 198
     'navigation' => array(
199 199
         'default' => array(
200
-             'home' => array(
201
-                 'label' => /*@translate*/ 'Home',
202
-                 'route' => 'lang',
203
-                 'visible' => false
204
-             ),
200
+                'home' => array(
201
+                    'label' => /*@translate*/ 'Home',
202
+                    'route' => 'lang',
203
+                    'visible' => false
204
+                ),
205 205
         ),
206 206
     ),
207 207
     // Configuration of the controller service manager (Which loads controllers)
Please login to merge, or discard this patch.
module/Auth/src/Auth/Controller/RegisterController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 
49 49
     public function indexAction()
50 50
     {
51
-        if (!$this->options->getEnableRegistration()){
51
+        if (!$this->options->getEnableRegistration()) {
52 52
             $this->notification()->info( /*@translate*/ 'Registration is disabled');
53 53
             return $this->redirect()->toRoute('lang');
54 54
         }
Please login to merge, or discard this patch.
module/Auth/src/Auth/Options/ModuleOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
      *
62 62
      * @var array()
63 63
      */
64
-    protected $enableLogins = ['facebook','xing','linkedin','google','github'];
64
+    protected $enableLogins = ['facebook', 'xing', 'linkedin', 'google', 'github'];
65 65
 
66 66
     /**
67 67
      * Enable Registration
Please login to merge, or discard this patch.
module/Core/src/Core/Factory/View/Helper/SocialButtonsFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         /* @var $serviceLocator \Zend\View\HelperPluginManager */
27 27
         $options = $serviceLocator->getServiceLocator()->get('Auth/Options');
28 28
         $config = $serviceLocator->getServiceLocator()->get('Config');
29
-        $helper = new SocialButtons($options,$config);
29
+        $helper = new SocialButtons($options, $config);
30 30
         return $helper;
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
module/Core/src/Core/View/Helper/SocialButtons.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      * @param $options ModuleOptions
29 29
      * @param $config array
30 30
      */
31
-    public function __construct($options,$config)
31
+    public function __construct($options, $config)
32 32
     {
33 33
         $this->options = $options;
34 34
         $this->config = $config;
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function __invoke()
44 44
     {
45
-        $SocialNetworksEnabled=[];
46
-        foreach($this->config['hybridauth'] as $key => $val) {
47
-            if ($val['enabled'] and in_array(strtolower($key), $this->options->getEnableLogins())){
45
+        $SocialNetworksEnabled = [];
46
+        foreach ($this->config['hybridauth'] as $key => $val) {
47
+            if ($val['enabled'] and in_array(strtolower($key), $this->options->getEnableLogins())) {
48 48
                 $SocialNetworksEnabled[strtolower($key)] = $key;
49 49
             }
50 50
         }
Please login to merge, or discard this patch.