Completed
Pull Request — develop (#359)
by Mathias
23:51
created
module/Jobs/src/Jobs/Filter/ViewModelTemplateFilterAbstract.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         if (!isset($this->job)) {
124 124
             throw new \InvalidArgumentException('cannot create a viewModel for Templates without an $job');
125 125
         }
126
-        $model->setTemplate('templates/' . $this->job->getTemplate() . '/index');
126
+        $model->setTemplate('templates/'.$this->job->getTemplate().'/index');
127 127
         return $model;
128 128
     }
129 129
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
             throw new \InvalidArgumentException('cannot create a viewModel for Templates without aa $job');
184 184
         }
185 185
         $location = $this->job->getLocation();
186
-        $this->container['location'] = isset($location)?$location:'';
186
+        $this->container['location'] = isset($location) ? $location : '';
187 187
         return $this;
188 188
     }
189 189
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
         }
205 205
         $description = $this->job->getTemplateValues()->getDescription();
206 206
 
207
-        $this->container['description'] = isset($description)?$description:'';
207
+        $this->container['description'] = isset($description) ? $description : '';
208 208
         return $this;
209 209
     }
210 210
 
@@ -268,9 +268,9 @@  discard block
 block discarded – undo
268 268
         if (!isset($this->job)) {
269 269
             throw new \InvalidArgumentException('cannot create a viewModel for Templates without a $job');
270 270
         }
271
-        $labelQualifications='';
272
-        $labelBenefits='';
273
-        $labelRequirements='';
271
+        $labelQualifications = '';
272
+        $labelBenefits = '';
273
+        $labelRequirements = '';
274 274
 
275 275
         $organization = $this->job->getOrganization();
276 276
         if (isset($organization)) {
Please login to merge, or discard this patch.
module/Applications/src/Applications/Repository/Application.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -131,8 +131,8 @@
 block discarded – undo
131 131
      */
132 132
     public function loadUnreadApplicationsForJob($job)
133 133
     {
134
-        $auth=$this->getService('AuthenticationService');
135
-        $qb=$this->createQueryBuilder()
134
+        $auth = $this->getService('AuthenticationService');
135
+        $qb = $this->createQueryBuilder()
136 136
                   ->field("readBy")->notIn(array($auth->getUser()->getId()))
137 137
                   ->field("job")->equals(new \MongoId($job->getId()));
138 138
         return $qb->getQuery()->execute();
Please login to merge, or discard this patch.
src/Organizations/Entity/Hydrator/Strategy/OrganizationNameStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     public function extract($value)
35 35
     {
36 36
         $name = '';
37
-        if (method_exists($value,"getName")) {
37
+        if (method_exists($value, "getName")) {
38 38
             $name = $value->getName();
39 39
         }
40 40
         return $name;
Please login to merge, or discard this patch.
module/Cv/src/Cv/Entity/Attachment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,6 +32,6 @@
 block discarded – undo
32 32
      */
33 33
     public function getUri()
34 34
     {
35
-        return "/file/Cv.Attachment/" . $this->getId() . "/" .urlencode($this->name);
35
+        return "/file/Cv.Attachment/".$this->getId()."/".urlencode($this->name);
36 36
     }
37 37
 }
Please login to merge, or discard this patch.
module/Auth/src/Auth/View/Helper/Auth.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,8 +97,8 @@
 block discarded – undo
97 97
             $value = null;
98 98
             $service = $this->getService();
99 99
             $user    = $service->getUser();
100
-            if (method_exists($user,"get".$property)) {
101
-                $value = $user->{"get" . $property}();
100
+            if (method_exists($user, "get".$property)) {
101
+                $value = $user->{"get".$property}();
102 102
             }
103 103
             return $value;
104 104
         } catch (\OutOfBoundsException $e) {
Please login to merge, or discard this patch.
module/Auth/src/Auth/Controller/IndexController.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 class IndexController extends AbstractActionController
35 35
 {
36 36
 
37
-    const LOGIN='login';
38
-    const REGISTER='register';
37
+    const LOGIN = 'login';
38
+    const REGISTER = 'register';
39 39
 
40 40
     /**
41 41
      * @var AuthenticationService
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $registerForm = $this->forms[self::REGISTER];
92 92
 
93 93
         /* @var $request \Zend\Http\Request */
94
-        $request   = $this->getRequest();
94
+        $request = $this->getRequest();
95 95
 
96 96
         if ($request->isPost()) {
97 97
             $data                          = $this->params()->fromPost();
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             if (array_key_exists('credentials', $data) &&
110 110
                 array_key_exists('login', $data['credentials']) &&
111 111
                 array_key_exists('credential', $data['credentials'])) {
112
-                $adapter->setIdentity($data['credentials']['login'] . $loginSuffix)
112
+                $adapter->setIdentity($data['credentials']['login'].$loginSuffix)
113 113
                     ->setCredential($data['credentials']['credential']);
114 114
             }
115 115
             
@@ -120,14 +120,14 @@  discard block
 block discarded – undo
120 120
             if ($result->isValid()) {
121 121
                 $user = $auth->getUser();
122 122
                 $language = $services->get('Core/Locale')->detectLanguage($request, $user);
123
-                $this->logger->info('User ' . $user->getLogin() . ' logged in');
123
+                $this->logger->info('User '.$user->getLogin().' logged in');
124 124
                 
125 125
                 $ref = $this->params()->fromQuery('ref', false);
126 126
 
127 127
                 if ($ref) {
128 128
                     $ref = urldecode($ref);
129
-                    $url = preg_replace('~/[a-z]{2}(/|$)~', '/' . $language . '$1', $ref);
130
-                    $url = $request->getBasePath() . $url;
129
+                    $url = preg_replace('~/[a-z]{2}(/|$)~', '/'.$language.'$1', $ref);
130
+                    $url = $request->getBasePath().$url;
131 131
                 } else {
132 132
                     $urlHelper = $services->get('ViewHelperManager')->get('url');
133 133
                     $url = $urlHelper('lang', array('lang' => $language));
@@ -137,9 +137,9 @@  discard block
 block discarded – undo
137 137
             } else {
138 138
                 $loginName = $data['credentials']['login'];
139 139
                 if (!empty($loginSuffix)) {
140
-                    $loginName = $loginName . ' (' . $loginName . $loginSuffix . ')';
140
+                    $loginName = $loginName.' ('.$loginName.$loginSuffix.')';
141 141
                 }
142
-                $this->logger->info('Failed to authenticate User ' . $loginName);
142
+                $this->logger->info('Failed to authenticate User '.$loginName);
143 143
                 $this->notification()->danger(/*@translate*/ 'Authentication failed.');
144 144
             }
145 145
         }
@@ -198,11 +198,11 @@  discard block
 block discarded – undo
198 198
             try {
199 199
                 $user          = $auth->getUser();
200 200
                 $password      = substr(md5(uniqid()), 0, 6);
201
-                $login         = uniqid() . ($this->options->auth_suffix != "" ? '@' . $this->options->auth_suffix : '');
202
-                $externalLogin = isset($user->login)?$user->login:'-- not communicated --';
203
-                $this->logger->debug('first login via ' . $provider . ' as: ' . $externalLogin);
201
+                $login         = uniqid().($this->options->auth_suffix != "" ? '@'.$this->options->auth_suffix : '');
202
+                $externalLogin = isset($user->login) ? $user->login : '-- not communicated --';
203
+                $this->logger->debug('first login via '.$provider.' as: '.$externalLogin);
204 204
 
205
-                $user->login=$login;
205
+                $user->login = $login;
206 206
                 $user->setPassword($password);
207 207
                 $user->setRole($this->options->getRole());
208 208
 
@@ -219,11 +219,11 @@  discard block
 block discarded – undo
219 219
                 );
220 220
                 $mail->addTo($user->getInfo()->getEmail());
221 221
 
222
-                $loggerId = $login . ' (' . $provider . ': ' . $externalLogin . ')';
222
+                $loggerId = $login.' ('.$provider.': '.$externalLogin.')';
223 223
                 if (isset($mail) && $this->mailer($mail)) {
224
-                    $this->logger->info('Mail first-login for ' . $loggerId . ' sent to ' . $user->getInfo()->getEmail());
224
+                    $this->logger->info('Mail first-login for '.$loggerId.' sent to '.$user->getInfo()->getEmail());
225 225
                 } else {
226
-                    $this->logger->warn('No Mail was sent for ' . $loggerId);
226
+                    $this->logger->warn('No Mail was sent for '.$loggerId);
227 227
                 }
228 228
             } catch (\Exception $e) {
229 229
                 $this->logger->crit($e);
@@ -234,11 +234,11 @@  discard block
 block discarded – undo
234 234
         }
235 235
         
236 236
         $user = $auth->getUser();
237
-        $this->logger->info('User ' . $auth->getUser()->getInfo()->getDisplayName() . ' logged in via ' . $provider);
237
+        $this->logger->info('User '.$auth->getUser()->getInfo()->getDisplayName().' logged in via '.$provider);
238 238
         $settings = $user->getSettings('Core');
239 239
         if (null !== $settings->localization->language) {
240 240
             $basePath = $this->getRequest()->getBasePath();
241
-            $ref = preg_replace('~^'.$basePath . '/[a-z]{2}(?=/|$)~', $basePath . '/' . $settings->localization->language, $ref);
241
+            $ref = preg_replace('~^'.$basePath.'/[a-z]{2}(?=/|$)~', $basePath.'/'.$settings->localization->language, $ref);
242 242
         }
243 243
         return $this->redirect()->toUrl($ref);
244 244
     }
@@ -270,8 +270,8 @@  discard block
 block discarded – undo
270 270
         
271 271
         if ($result->isValid()) {
272 272
             $this->logger->info(
273
-                'User ' . $this->params()->fromPost('user') .
274
-                ' logged via ' . $appKey
273
+                'User '.$this->params()->fromPost('user').
274
+                ' logged via '.$appKey
275 275
             );
276 276
             
277 277
             // the external login may include some parameters for an update
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
             if (array_key_exists('firstLogin', $resultMessage) && $resultMessage['firstLogin'] === true) {
303 303
                 // first external Login
304 304
                 $userName = $this->params()->fromPost('user');
305
-                $this->logger->debug('first login for User: ' .  $userName);
305
+                $this->logger->debug('first login for User: '.$userName);
306 306
                 //
307 307
                 if (preg_match('/^(.*)@\w+$/', $userName, $realUserName)) {
308 308
                     $userName = $realUserName[1];
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 
327 327
                 try {
328 328
                     $this->mailer($mail);
329
-                    $this->logger->info('Mail first-login sent to ' . $userName);
329
+                    $this->logger->info('Mail first-login sent to '.$userName);
330 330
                 } catch (\Zend\Mail\Transport\Exception\ExceptionInterface $e) {
331 331
                     $this->logger->warn('No Mail was sent');
332 332
                     $this->logger->debug($e);
@@ -341,8 +341,8 @@  discard block
 block discarded – undo
341 341
             );
342 342
         } else {
343 343
             $this->logger->info(
344
-                'Failed to authenticate User ' . $this->params()->fromPost('user') .
345
-                ' via ' . $this->params()->fromPost('appKey')
344
+                'Failed to authenticate User '.$this->params()->fromPost('user').
345
+                ' via '.$this->params()->fromPost('appKey')
346 346
             );
347 347
             
348 348
             $this->getResponse()->setStatusCode(Response::STATUS_CODE_401);
@@ -367,8 +367,8 @@  discard block
 block discarded – undo
367 367
                 array(
368 368
                 'format' => 'json',
369 369
                     'group' => array(
370
-                        0 => 'testuser4711', 1 => 'flatscreen', 2 => 'flatscreen1', 3 => 'flatscreen2', 4 => 'flatscreen3',  5 => 'flatscreen4',
371
-                        6 => 'flatscreen5', 7 => 'flatscreen6', 8 => 'flatscreen7',  9 => 'flatscreen8', 10 => 'flatscreen9'
370
+                        0 => 'testuser4711', 1 => 'flatscreen', 2 => 'flatscreen1', 3 => 'flatscreen2', 4 => 'flatscreen3', 5 => 'flatscreen4',
371
+                        6 => 'flatscreen5', 7 => 'flatscreen6', 8 => 'flatscreen7', 9 => 'flatscreen8', 10 => 'flatscreen9'
372 372
                     ),
373 373
                     'name' => '(die) Rauscher – Unternehmensberatung & Consulting',
374 374
                 )
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
         }
378 378
         $auth = $this->auth;
379 379
         $userGrpAdmin = $auth->getUser();
380
-        $this->logger->info('User ' . $auth->getUser()->getInfo()->getDisplayName());
380
+        $this->logger->info('User '.$auth->getUser()->getInfo()->getDisplayName());
381 381
         $grp = $this->params()->fromQuery('group');
382 382
         
383 383
         // if the request is made by an external host, add his identification-key to the name
@@ -398,16 +398,16 @@  discard block
 block discarded – undo
398 398
             foreach ($params->group as $grp_member) {
399 399
                 try
400 400
                 {
401
-                    $user = $users->findByLogin($grp_member . $loginSuffix);
401
+                    $user = $users->findByLogin($grp_member.$loginSuffix);
402 402
                     if (!empty($user)) {
403 403
                         $groupUserId[] = $user->id;
404 404
                     } else {
405
-                        $notFoundUsers[] = $grp_member . $loginSuffix;
405
+                        $notFoundUsers[] = $grp_member.$loginSuffix;
406 406
                     }
407 407
                 }
408 408
                 catch (\Auth\Exception\UserDeactivatedException $e)
409 409
                 {
410
-                    $notFoundUsers[] = $grp_member . $loginSuffix;
410
+                    $notFoundUsers[] = $grp_member.$loginSuffix;
411 411
                 }
412 412
             }
413 413
         }
@@ -417,9 +417,9 @@  discard block
 block discarded – undo
417 417
             $group->setUsers($groupUserId);
418 418
         }
419 419
         $this->logger->info(
420
-            'Update Group Name: ' . $name . PHP_EOL . str_repeat(' ', 36) . 'Group Owner: ' . $userGrpAdmin->getLogin() . PHP_EOL .
421
-            str_repeat(' ', 36) . 'Group Members Param: ' . implode(',', $params->group) . PHP_EOL .
422
-            str_repeat(' ', 36) . 'Group Members: ' . count($groupUserId) . PHP_EOL . str_repeat(' ', 36) . 'Group Members not found: ' . implode(',', $notFoundUsers)
420
+            'Update Group Name: '.$name.PHP_EOL.str_repeat(' ', 36).'Group Owner: '.$userGrpAdmin->getLogin().PHP_EOL.
421
+            str_repeat(' ', 36).'Group Members Param: '.implode(',', $params->group).PHP_EOL.
422
+            str_repeat(' ', 36).'Group Members: '.count($groupUserId).PHP_EOL.str_repeat(' ', 36).'Group Members not found: '.implode(',', $notFoundUsers)
423 423
         );
424 424
         
425 425
         return new JsonModel(
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     public function logoutAction()
437 437
     {
438 438
         $auth = $this->auth;
439
-        $this->logger->info('User ' . ($auth->getUser()->getLogin()==''?$auth->getUser()->getInfo()->getDisplayName():$auth->getUser()->getLogin()) . ' logged out');
439
+        $this->logger->info('User '.($auth->getUser()->getLogin() == '' ? $auth->getUser()->getInfo()->getDisplayName() : $auth->getUser()->getLogin()).' logged out');
440 440
         $auth->clearIdentity();
441 441
         unset($_SESSION['HA::STORE']);
442 442
 
Please login to merge, or discard this patch.
module/Auth/src/Auth/Controller/Plugin/Auth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
                 }
93 93
                 return $value;
94 94
             }
95
-            return 'id' == $property ? $auth->getIdentity() : $auth->getUser()->{'get' . $property}();
95
+            return 'id' == $property ? $auth->getIdentity() : $auth->getUser()->{'get'.$property}();
96 96
         }
97 97
         return null;
98 98
     }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Form/JobDescriptionHtml.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
             'options' => [
52 52
                 'placeholder' => /*@translate*/ 'Enter pure html code here',
53 53
             ],
54
-                'attributes' => ['style' => 'width:100%;height:100%;',]
54
+                'attributes' => ['style' => 'width:100%;height:100%;', ]
55 55
             ]
56 56
         );
57 57
     }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Entity/TemplateValues.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @var String
37 37
      * @ODM\Field(type="string")
38 38
      */
39
-    protected $qualifications='';
39
+    protected $qualifications = '';
40 40
 
41 41
     /**
42 42
      * Requirements field of the job template
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      * @var String
45 45
      * @ODM\Field(type="string")
46 46
      */
47
-    protected $requirements='';
47
+    protected $requirements = '';
48 48
 
49 49
     /**
50 50
      * Benefits field of the job template
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @var String
53 53
      * @ODM\Field(type="string")
54 54
      */
55
-    protected $benefits='';
55
+    protected $benefits = '';
56 56
 
57 57
     /**
58 58
      * Job title field of the job template
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @var String
61 61
      * @ODM\Field(type="string")
62 62
      */
63
-    protected $title='';
63
+    protected $title = '';
64 64
 
65 65
     /**
66 66
      * Company description field of the job template
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @var String
69 69
      * @ODM\Field(type="string")
70 70
      */
71
-    protected $description='';
71
+    protected $description = '';
72 72
 
73 73
     /**
74 74
      * language of the job template values. Must be a valid ISO 639-1 code
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      * @var String
77 77
      * @ODM\Field(type="string")
78 78
      */
79
-    protected $language='en';
79
+    protected $language = 'en';
80 80
 
81 81
     /**
82 82
      * Pure HTML
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      * @var string
86 86
      * @since 0.29
87 87
      */
88
-    protected $html='';
88
+    protected $html = '';
89 89
 
90 90
     /**
91 91
      * free values (currently not in use)
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function setQualifications($qualifications)
104 104
     {
105
-        $this->qualifications= (string) $qualifications;
105
+        $this->qualifications = (string) $qualifications;
106 106
         return $this;
107 107
     }
108 108
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     public function setRequirements($requirements)
126 126
     {
127
-        $this->requirements=(string) $requirements;
127
+        $this->requirements = (string) $requirements;
128 128
         return $this;
129 129
     }
130 130
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      */
147 147
     public function setBenefits($benefits)
148 148
     {
149
-        $this->benefits=(string) $benefits;
149
+        $this->benefits = (string) $benefits;
150 150
         return $this;
151 151
     }
152 152
 
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      */
169 169
     public function setTitle($title)
170 170
     {
171
-        $this->title=(string) $title;
171
+        $this->title = (string) $title;
172 172
         return $this;
173 173
     }
174 174
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
      */
191 191
     public function setDescription($description)
192 192
     {
193
-        $this->description=(string) $description;
193
+        $this->description = (string) $description;
194 194
         return $this;
195 195
     }
196 196
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     public function setLanguage($language)
214 214
     {
215
-        $this->language=(string) $language;
215
+        $this->language = (string) $language;
216 216
         return $this;
217 217
     }
218 218
 
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 
282 282
     public function __get($property)
283 283
     {
284
-        $getter = "get" . ucfirst($property);
284
+        $getter = "get".ucfirst($property);
285 285
         if (method_exists($this, $getter)) {
286 286
             return $this->$getter();
287 287
         }
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
     public function __set($property, $value)
297 297
     {
298 298
         //$this->checkWriteAccess();
299
-        $setter = 'set' . ucfirst($property);
299
+        $setter = 'set'.ucfirst($property);
300 300
         if (method_exists($this, $setter)) {
301 301
             $this->$setter($value);
302 302
             return;
Please login to merge, or discard this patch.