@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | } |
116 | 116 | |
117 | 117 | $identity = $this->getIdentity(); |
118 | - $applicationId = '@' . $this->getApplicationIdentifier(); |
|
118 | + $applicationId = '@'.$this->getApplicationIdentifier(); |
|
119 | 119 | $applicationIdIndex = strrpos($identity, $applicationId); |
120 | 120 | //$login = (0 < $applicationIdIndex && strlen($identity) - strlen($applicationId) == $applicationIdIndex)?substr($identity, 0, $applicationIdIndex):$identity; |
121 | 121 | $login = $identity; |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | $loginSuccess = false; |
129 | 129 | $loginResult = array(); |
130 | 130 | |
131 | - if (0 < $applicationIdIndex && strlen($identity) - strlen($applicationId) == $applicationIdIndex) { |
|
132 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', login with correct suffix: '); |
|
131 | + if (0 < $applicationIdIndex && strlen($identity) - strlen($applicationId) == $applicationIdIndex) { |
|
132 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', login with correct suffix: '); |
|
133 | 133 | // the login ends with the applicationID, therefore use the secret key |
134 | 134 | // the external login must be the form 'xxxxx@yyyy' where yyyy is the matching suffix to the external application key |
135 | 135 | if (isset($user)) { |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $loginSuccess = true; |
138 | 138 | } else { |
139 | 139 | $loginSuccess = false; |
140 | - $this->serviceManager->get('Core/Log')->info('User ' . $login . ', secret: ' . $user->getSecret() . ' != loginPassword: ' . $filter->filter($credential) . ' (' . $credential . ')'); |
|
140 | + $this->serviceManager->get('Core/Log')->info('User '.$login.', secret: '.$user->getSecret().' != loginPassword: '.$filter->filter($credential).' ('.$credential.')'); |
|
141 | 141 | } |
142 | 142 | } else { |
143 | 143 | $user = $users->create( |
@@ -153,17 +153,17 @@ discard block |
||
153 | 153 | $loginResult = array('firstLogin' => true); |
154 | 154 | } |
155 | 155 | } elseif (isset($user)) { |
156 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', login with incorrect suffix: '); |
|
156 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', login with incorrect suffix: '); |
|
157 | 157 | if ($user->getCredential() == $filter->filter($credential)) { |
158 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', credentials are equal'); |
|
158 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', credentials are equal'); |
|
159 | 159 | $loginSuccess = true; |
160 | 160 | } elseif (!empty($applicationId)) { |
161 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', credentials are not equal'); |
|
161 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', credentials are not equal'); |
|
162 | 162 | // TODO: remove this code as soon as the secret key has been fully established |
163 | 163 | // basically this does allow an external login with an applicationIndex match against the User-Password |
164 | 164 | // the way it had been used in the start |
165 | 165 | if ($user->getCredential() == $filter->filter($credential)) { |
166 | - $this->serviceManager->get('Core/Log')->debug('User ' . $login . ', credentials2 test'); |
|
166 | + $this->serviceManager->get('Core/Log')->debug('User '.$login.', credentials2 test'); |
|
167 | 167 | $loginSuccess = true; |
168 | 168 | } |
169 | 169 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $entity = $repositoriesJob->findOneBy(array("applyId" => (string) $applyId)); |
83 | 83 | if (!isset($entity)) { |
84 | 84 | // new Job (the more likely branch) |
85 | - $entity =$repositoriesJob->create(array("applyId" => (string) $applyId)); |
|
85 | + $entity = $repositoriesJob->create(array("applyId" => (string) $applyId)); |
|
86 | 86 | } else { |
87 | 87 | $createdJob = false; |
88 | 88 | } |
@@ -127,10 +127,10 @@ discard block |
||
127 | 127 | $entity->getPermissions()->grant($group, PermissionsInterface::PERMISSION_VIEW); |
128 | 128 | } |
129 | 129 | $result['isSaved'] = true; |
130 | - $log->info('Jobs/manage/saveJob [user: ' . $user->getLogin() . ']:' . var_export($p, true)); |
|
130 | + $log->info('Jobs/manage/saveJob [user: '.$user->getLogin().']:'.var_export($p, true)); |
|
131 | 131 | |
132 | 132 | if (!empty($params->companyId)) { |
133 | - $companyId = $params->companyId . $loginSuffix; |
|
133 | + $companyId = $params->companyId.$loginSuffix; |
|
134 | 134 | $repOrganization = $repositories->get('Organizations/Organization'); |
135 | 135 | $hydratorManager = $services->get('hydratorManager'); |
136 | 136 | /* @var \Organizations\Entity\Hydrator\OrganizationHydrator $hydrator */ |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $jobLocations->clear(); |
182 | 182 | foreach ($locations as $locData) { |
183 | 183 | $location = new Location(); |
184 | - $coords = array_map(function ($i) { return (float) $i; }, $locData['coordinates']); |
|
184 | + $coords = array_map(function($i) { return (float) $i; }, $locData['coordinates']); |
|
185 | 185 | $location->setCountry($locData['country']) |
186 | 186 | ->setRegion($locData['region']) |
187 | 187 | ->setCity($locData['city']) |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | break; |
247 | 247 | } |
248 | 248 | if (array_key_exists($portal, $result['portals'])) { |
249 | - throw new \RuntimeException('Publisher-Events (internal error): There are two publisher registered for ' . $portal); |
|
249 | + throw new \RuntimeException('Publisher-Events (internal error): There are two publisher registered for '.$portal); |
|
250 | 250 | } |
251 | 251 | $result['portals'][$portal] = $status; |
252 | 252 | } else { |
@@ -259,16 +259,16 @@ discard block |
||
259 | 259 | } |
260 | 260 | } |
261 | 261 | } else { |
262 | - $log->info('Jobs/manage/saveJob [error: ' . $form->getMessages() . ']:' . var_export($p, true)); |
|
262 | + $log->info('Jobs/manage/saveJob [error: '.$form->getMessages().']:'.var_export($p, true)); |
|
263 | 263 | $result['valid Error'] = $form->getMessages(); |
264 | 264 | } |
265 | 265 | } |
266 | 266 | } else { |
267 | - $log->info('Jobs/manage/saveJob [error: session lost]:' . var_export($p, true)); |
|
267 | + $log->info('Jobs/manage/saveJob [error: session lost]:'.var_export($p, true)); |
|
268 | 268 | $result['message'] = 'session_id is lost'; |
269 | 269 | } |
270 | 270 | } catch (\Exception $e) { |
271 | - $result['message'] = 'exception occured: ' . $e->getMessage(); |
|
271 | + $result['message'] = 'exception occured: '.$e->getMessage(); |
|
272 | 272 | } |
273 | 273 | //$services->get('Core/Log')->info('Jobs/manage/saveJob result:' . PHP_EOL . var_export($p, True)); |
274 | 274 | return new JsonModel($result); |