Completed
Pull Request — develop (#346)
by ANTHONIUS
06:57
created
module/Core/src/Core/Form/EmptySummaryAwareTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     public function getEmptySummaryNotice()
52 52
     {
53
-        if (! isset($this->emptySummaryNotice) && property_exists($this, 'defaultEmptySummaryNotice')) {
53
+        if (!isset($this->emptySummaryNotice) && property_exists($this, 'defaultEmptySummaryNotice')) {
54 54
             $this->emptySummaryNotice = $this->defaultEmptySummaryNotice;
55 55
         }
56 56
         
Please login to merge, or discard this patch.
module/Core/src/Core/Listener/LanguageRouteListener.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -97,10 +97,10 @@  discard block
 block discarded – undo
97 97
         }
98 98
         
99 99
         $router = $e->getRouter();
100
-        $basePath=$router->getBaseUrl();
100
+        $basePath = $router->getBaseUrl();
101 101
         $match = [];
102 102
         
103
-        if (preg_match('~^' . $basePath . '/([a-z]{2})(?:/|$)~', $e->getRequest()->getRequestUri(), $match)) {
103
+        if (preg_match('~^'.$basePath.'/([a-z]{2})(?:/|$)~', $e->getRequest()->getRequestUri(), $match)) {
104 104
             /* It seems we have already a language in the URI
105 105
              * Now there are two possibilities:
106 106
              *
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
         setlocale(
183 183
             LC_ALL,
184 184
             array(
185
-            $locale . ".utf8",
186
-            $locale . ".iso88591",
185
+            $locale.".utf8",
186
+            $locale.".iso88591",
187 187
             $locale,
188 188
             substr($locale, 0, 2),
189 189
             'de_DE.utf8',
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->login . ' logged in');
123
+                $this->logger->info('User '.$user->login.' 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()->login==''?$auth->getUser()->info->displayName:$auth->getUser()->login) . ' logged out');
439
+        $this->logger->info('User '.($auth->getUser()->login == '' ? $auth->getUser()->info->displayName : $auth->getUser()->login).' logged out');
440 440
         $auth->clearIdentity();
441 441
         unset($_SESSION['HA::STORE']);
442 442
 
Please login to merge, or discard this patch.
module/Install/config/module.config.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
         'exception_template' => 'error/index',
79 79
         // Map template to files. Speeds up the lookup through the template stack.
80 80
         'template_map' => array(
81
-            'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
82
-            'error/index' => __DIR__ . '/../view/error/index.phtml',
81
+            'layout/layout' => __DIR__.'/../view/layout/layout.phtml',
82
+            'error/index' => __DIR__.'/../view/error/index.phtml',
83 83
         ),
84 84
         // Where to look for view templates not mapped above
85 85
         'template_path_stack' => array(
86
-            __DIR__ . '/../view',
86
+            __DIR__.'/../view',
87 87
         ),
88 88
     ),
89 89
 
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
         'translation_file_patterns' => array(
92 92
             array(
93 93
                 'type' => 'gettext',
94
-                'base_dir' => __DIR__ . '/../language',
94
+                'base_dir' => __DIR__.'/../language',
95 95
                 'pattern' => '%s.mo',
96 96
                 'text_domain' => 'Install',
97 97
             ),
98 98
             [
99 99
                 'type'     => 'phparray',
100
-                'base_dir' => __DIR__ . '/../../Core/language',
100
+                'base_dir' => __DIR__.'/../../Core/language',
101 101
                 'pattern' => 'Zend_Validate.%s.php',
102 102
                 'text_domain' => 'default',
103 103
             ],
Please login to merge, or discard this patch.
module/Applications/src/Applications/Auth/Dependency/ListListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         foreach ($this->repository->getUserApplications($user->getId(), $limit) as $application) /* @var $application \Applications\Entity\Application */
64 64
         {
65 65
             $title = $application->getJob()->getTitle();
66
-            $title .= ' ('. $view->dateFormat($application->getDateCreated()) . ')';
66
+            $title .= ' ('.$view->dateFormat($application->getDateCreated()).')';
67 67
             $url = $view->url('lang/applications/detail', ['id' => $application->getId()]);
68 68
             $items[] = new ListItem($title, $url);
69 69
         }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Auth/Dependency/ListListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         foreach ($this->repository->getUserJobs($user->getId(), $limit) as $job) /* @var $job \Jobs\Entity\Job */
64 64
         {
65 65
             $title = $job->getTitle() ?: $view->translate('untitled');
66
-            $title .= ' ('. $view->dateFormat($job->getDateCreated(), 'short', 'none') . ')';
66
+            $title .= ' ('.$view->dateFormat($job->getDateCreated(), 'short', 'none').')';
67 67
             $url = $view->url('lang/jobs/manage', ['action' => 'edit'], [
68 68
                 'query' => [
69 69
                     'id' => $job->getId()
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.
module/Applications/src/Applications/Options/ModuleOptions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      *
36 36
      * @var array $attachmentsMimeType
37 37
      */
38
-    protected $attachmentsMimeType = array('image','applications/pdf',
38
+    protected $attachmentsMimeType = array('image', 'applications/pdf',
39 39
         'application/x-pdf',
40 40
         'application/acrobat',
41 41
         'applications/vnd.pdf',
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      */
234 234
     public function setAllowSubsequentAttachmentUpload($allowSubsequentAttachmentUpload)
235 235
     {
236
-        $this->allowSubsequentAttachmentUpload = (bool)$allowSubsequentAttachmentUpload;
236
+        $this->allowSubsequentAttachmentUpload = (bool) $allowSubsequentAttachmentUpload;
237 237
         
238 238
         return $this;
239 239
     }
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/FormFileUpload.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -98,12 +98,12 @@  discard block
 block discarded – undo
98 98
     </a>
99 99
     <div class="fu-errors input-error">
100 100
         <ul class="errors">
101
-            <li class="fu-error-size">' . $translator->translate('The file is too big', $textDomain) . '</li>
102
-            <li class="fu-error-type">' . $translator->translate('The file type is not supported', $textDomain) . '</li>
101
+            <li class="fu-error-size">' . $translator->translate('The file is too big', $textDomain).'</li>
102
+            <li class="fu-error-type">' . $translator->translate('The file type is not supported', $textDomain).'</li>
103 103
             <li class="fu-error-count">' . sprintf(
104 104
     $translator->translate('You may only upload %d files', $textDomain),
105 105
     $element->getAttribute('data-maxfilecount')
106
-) . '</li><li class="fu-error-general">' . $translator->translate('An unknown error occured.') . '</li>
106
+).'</li><li class="fu-error-general">'.$translator->translate('An unknown error occured.').'</li>
107 107
         </ul>
108 108
    </div>
109 109
 </li>';
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         /* @var $basepath \Zend\View\Helper\BasePath */
112 112
         $renderer          = $this->getView();
113 113
         $basepath          = $renderer->plugin('basepath');
114
-        $createFileDisplay = function ($file) use ($template, $basepath) {
114
+        $createFileDisplay = function($file) use ($template, $basepath) {
115 115
             /* @var $file \Core\Entity\FileInterface */
116 116
             $uri  = $basepath($file->getUri());
117 117
             $name = $file->getName();
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
         }
147 147
 
148 148
         $nonemptynotice =
149
-            '<div class="fu-nonempty-notice"' . ('' == trim($preview) ? ' style="display:none;"' : '') . '>'
150
-            . $this->getNonEmptyNotice() . '</div>';
149
+            '<div class="fu-nonempty-notice"'.('' == trim($preview) ? ' style="display:none;"' : '').'>'
150
+            . $this->getNonEmptyNotice().'</div>';
151 151
         $emptynotice    = '<div class="fu-empty-notice"'
152
-                          . ('' == trim($preview) ? '' : ' style="display: none;"') . '>
153
-                       ' . $this->getEmptyNotice() . '
152
+                          . ('' == trim($preview) ? '' : ' style="display: none;"').'>
153
+                       ' . $this->getEmptyNotice().'
154 154
                   </div>';
155 155
 
156 156
         $markup = '
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 	 */
299 299
 	protected function getDefaultNotice()
300 300
 	{
301
-		return '<small>' . $this->getTranslator()->translate('Click here to add files or use drag and drop.') . '</small>';
301
+		return '<small>'.$this->getTranslator()->translate('Click here to add files or use drag and drop.').'</small>';
302 302
 	}
303 303
 	
304 304
     /**
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 	 */
309 309
 	public function setAllowRemove($allowRemove)
310 310
 	{
311
-		$this->allowRemove = (bool)$allowRemove;
311
+		$this->allowRemove = (bool) $allowRemove;
312 312
 		
313 313
 		return $this;
314 314
 	}
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 	 */
321 321
 	public function setAllowClickableDropZone($allowClickableDropZone)
322 322
 	{
323
-		$this->allowClickableDropZone = (bool)$allowClickableDropZone;
323
+		$this->allowClickableDropZone = (bool) $allowClickableDropZone;
324 324
 		
325 325
 		return $this;
326 326
 	}
Please login to merge, or discard this patch.