@@ -49,7 +49,7 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | if (null === $uri && isset($_SERVER['REQUEST_URI'])) { |
52 | - $uri = preg_replace('~^' . $this->getView()->basePath() . '~', '', $_SERVER['REQUEST_URI']); |
|
52 | + $uri = preg_replace('~^'.$this->getView()->basePath().'~', '', $_SERVER['REQUEST_URI']); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | if (null === $stripParams) { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | $identity = $this->getIdentity(); |
121 | - $applicationId = '@' . $this->getApplicationIdentifier(); |
|
121 | + $applicationId = '@'.$this->getApplicationIdentifier(); |
|
122 | 122 | $applicationIdIndex = strrpos($identity, $applicationId); |
123 | 123 | //$login = (0 < $applicationIdIndex && strlen($identity) - strlen($applicationId) == $applicationIdIndex)?substr($identity, 0, $applicationIdIndex):$identity; |
124 | 124 | $login = $identity; |
@@ -130,8 +130,8 @@ discard block |
||
130 | 130 | $loginSuccess = false; |
131 | 131 | $loginResult = array(); |
132 | 132 | |
133 | - if (0 < $applicationIdIndex && strlen($identity) - strlen($applicationId) == $applicationIdIndex) { |
|
134 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', login with correct suffix: '); |
|
133 | + if (0 < $applicationIdIndex && strlen($identity) - strlen($applicationId) == $applicationIdIndex) { |
|
134 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', login with correct suffix: '); |
|
135 | 135 | // the login ends with the applicationID, therefore use the secret key |
136 | 136 | // the external login must be the form 'xxxxx@yyyy' where yyyy is the matching suffix to the external application key |
137 | 137 | if (isset($user)) { |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $loginSuccess = true; |
140 | 140 | } else { |
141 | 141 | $loginSuccess = false; |
142 | - $this->serviceManager->get('Core/Log')->info('User ' . $login . ', secret: ' . $user->secret . ' != loginPassword: ' . $filter->filter($credential) . ' (' . $credential . ')'); |
|
142 | + $this->serviceManager->get('Core/Log')->info('User '.$login.', secret: '.$user->secret.' != loginPassword: '.$filter->filter($credential).' ('.$credential.')'); |
|
143 | 143 | } |
144 | 144 | } else { |
145 | 145 | $user = $users->create( |
@@ -155,17 +155,17 @@ discard block |
||
155 | 155 | $loginResult = array('firstLogin' => true); |
156 | 156 | } |
157 | 157 | } elseif (isset($user)) { |
158 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', login with noncorrect suffix: '); |
|
158 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', login with noncorrect suffix: '); |
|
159 | 159 | if ($user->credential == $filter->filter($credential)) { |
160 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', credentials are equal'); |
|
160 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', credentials are equal'); |
|
161 | 161 | $loginSuccess = true; |
162 | 162 | } elseif (!empty($applicationId)) { |
163 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', credentials are not equal'); |
|
163 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', credentials are not equal'); |
|
164 | 164 | // TODO: remove this code as soon as the secret key has been fully established |
165 | 165 | // basically this does allow an external login with an applicationIndex match against the User-Password |
166 | 166 | // the way it had been used in the start |
167 | 167 | if ($user->credential == $filter->filter($credential)) { |
168 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', credentials2 test'); |
|
168 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', credentials2 test'); |
|
169 | 169 | $loginSuccess = true; |
170 | 170 | } |
171 | 171 | } |
@@ -45,6 +45,6 @@ |
||
45 | 45 | if (!$loginSuffixResponseCollection->isEmpty()) { |
46 | 46 | $suffix = $loginSuffixResponseCollection->last(); |
47 | 47 | } |
48 | - return $value . $suffix; |
|
48 | + return $value.$suffix; |
|
49 | 49 | } |
50 | 50 | } |
@@ -44,6 +44,6 @@ |
||
44 | 44 | |
45 | 45 | parse_str($query, $queryParams); |
46 | 46 | $queryParams = array_diff_key($queryParams, array_flip($stripParams)); |
47 | - return $uri . (empty($queryParams) ? '' : '?' . http_build_query($queryParams)); |
|
47 | + return $uri.(empty($queryParams) ? '' : '?'.http_build_query($queryParams)); |
|
48 | 48 | } |
49 | 49 | } |
@@ -55,7 +55,7 @@ discard block |
||
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(403) |
60 | 60 | ->setContent(file_get_contents($image)) |
61 | 61 | ->getHeaders() |
@@ -78,7 +78,7 @@ discard block |
||
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 | $result = $e->getApplication()->getEventManager()->trigger('dispatch', $e); |
@@ -56,7 +56,7 @@ |
||
56 | 56 | throw new \InvalidArgumentException( |
57 | 57 | sprintf( |
58 | 58 | 'Adapter must be either a string or an instance of \Auth\Controller\Plugin\SocialProfiles\AbstractAdapter, but received %s', |
59 | - is_object($adapter) ? get_class($adapter) : '(' . gettype($adapter) . ')' |
|
59 | + is_object($adapter) ? get_class($adapter) : '('.gettype($adapter).')' |
|
60 | 60 | ) |
61 | 61 | ); |
62 | 62 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | public function fetch($api) |
25 | 25 | { |
26 | - $result = $this->queryApi($api); |
|
26 | + $result = $this->queryApi($api); |
|
27 | 27 | if (!$result) { |
28 | 28 | return false; |
29 | 29 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $class = get_class($this); |
50 | 50 | $class = explode('\\', $class); |
51 | 51 | $class = array_pop($class); |
52 | - $class = '\\Auth\\Entity\\SocialProfiles\\' . $class; |
|
52 | + $class = '\\Auth\\Entity\\SocialProfiles\\'.$class; |
|
53 | 53 | |
54 | 54 | return $class; |
55 | 55 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | if ($this->hasIdentity() && ($id = $this->getIdentity())) { |
62 | 62 | $user = $this->getRepository()->find($id); |
63 | 63 | if (!$user) { |
64 | - throw new \OutOfBoundsException('Unknown user id: ' . $id); |
|
64 | + throw new \OutOfBoundsException('Unknown user id: '.$id); |
|
65 | 65 | } |
66 | 66 | $this->user = $user; |
67 | 67 | } else { |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function getConfig() |
39 | 39 | { |
40 | - return ModuleConfigLoader::load(__DIR__ . '/config'); |
|
40 | + return ModuleConfigLoader::load(__DIR__.'/config'); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -53,19 +53,19 @@ discard block |
||
53 | 53 | // This ensures the class from "addtional-providers" is loaded. |
54 | 54 | array( |
55 | 55 | 'Hybrid_Providers_XING' |
56 | - => __DIR__ . '/../../vendor/hybridauth/hybridauth/additional-providers/hybridauth-xing/Providers/XING.php', |
|
56 | + => __DIR__.'/../../vendor/hybridauth/hybridauth/additional-providers/hybridauth-xing/Providers/XING.php', |
|
57 | 57 | ), |
58 | 58 | array( |
59 | 59 | 'Hybrid_Providers_Github' |
60 | - => __DIR__ . '/../../vendor/hybridauth/hybridauth/additional-providers/hybridauth-github/Providers/GitHub.php', |
|
60 | + => __DIR__.'/../../vendor/hybridauth/hybridauth/additional-providers/hybridauth-github/Providers/GitHub.php', |
|
61 | 61 | ), |
62 | 62 | ), |
63 | 63 | 'Zend\Loader\StandardAutoloader' => array( |
64 | 64 | 'namespaces' => array( |
65 | - __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, |
|
66 | - 'AuthTest' => __DIR__ . '/test/AuthTest', |
|
67 | - 'Acl' => __DIR__ . '/src/Acl', |
|
68 | - 'AclTest' => __DIR__ . '/test/AclTest', |
|
65 | + __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__, |
|
66 | + 'AuthTest' => __DIR__.'/test/AuthTest', |
|
67 | + 'Acl' => __DIR__.'/src/Acl', |
|
68 | + 'AclTest' => __DIR__.'/test/AclTest', |
|
69 | 69 | ), |
70 | 70 | ), |
71 | 71 | ); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | $eventManager->attach( |
83 | 83 | MvcEvent::EVENT_ROUTE, |
84 | - function (MvcEvent $e) use ($services) { |
|
84 | + function(MvcEvent $e) use ($services) { |
|
85 | 85 | /** @var CheckPermissionsListener $checkPermissionsListener */ |
86 | 86 | $checkPermissionsListener = $services->get('Auth/CheckPermissionsListener'); |
87 | 87 | $checkPermissionsListener->onRoute($e); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | $eventManager->attach( |
93 | 93 | MvcEvent::EVENT_DISPATCH, |
94 | - function (MvcEvent $e) use ($services) { |
|
94 | + function(MvcEvent $e) use ($services) { |
|
95 | 95 | /** @var CheckPermissionsListener $checkPermissionsListener */ |
96 | 96 | $checkPermissionsListener = $services->get('Auth/CheckPermissionsListener'); |
97 | 97 | $checkPermissionsListener->onDispatch($e); |