@@ -136,13 +136,13 @@ |
||
136 | 136 | { |
137 | 137 | $mail = $this->mailer->get('htmltemplate'); |
138 | 138 | $mail->setTemplate($template) |
139 | - ->setSubject($subject) |
|
140 | - ->setVariables( |
|
141 | - array( |
|
139 | + ->setSubject($subject) |
|
140 | + ->setVariables( |
|
141 | + array( |
|
142 | 142 | 'job' => $job, |
143 | 143 | 'siteName' => $this->options['siteName'], |
144 | 144 | ) |
145 | - ); |
|
145 | + ); |
|
146 | 146 | |
147 | 147 | if ($adminMail) { |
148 | 148 | $mail->setTo($this->options['adminEmail']); |
@@ -227,11 +227,11 @@ discard block |
||
227 | 227 | protected function save() |
228 | 228 | { |
229 | 229 | $formEvents = $this->jobFormEvents; |
230 | - $user = $this->auth->getUser(); |
|
230 | + $user = $this->auth->getUser(); |
|
231 | 231 | if (empty($user->getInfo()->getEmail())) { |
232 | 232 | return $this->getErrorViewModel('no-parent', array('cause' => 'noEmail')); |
233 | 233 | } |
234 | - $userOrg = $user->getOrganization(); |
|
234 | + $userOrg = $user->getOrganization(); |
|
235 | 235 | if (!$userOrg->hasAssociation() || $userOrg->getOrganization()->isDraft()) { |
236 | 236 | return $this->getErrorViewModel('no-parent', array('cause' => 'noCompany')); |
237 | 237 | } |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | } |
262 | 262 | |
263 | 263 | |
264 | - $viewModel = null; |
|
264 | + $viewModel = null; |
|
265 | 265 | $this->acl($jobEntity, 'edit'); |
266 | 266 | if ($status = $params->fromQuery('status')) { |
267 | 267 | $this->changeStatus($jobEntity, $status); |
@@ -273,11 +273,11 @@ discard block |
||
273 | 273 | $instanceForm = null; |
274 | 274 | $formErrorMessages = array(); |
275 | 275 | |
276 | - if (isset($formIdentifier) && $request->isPost()) { |
|
276 | + if (isset($formIdentifier) && $request->isPost()) { |
|
277 | 277 | // at this point the form get instantiated and immediately accumulated |
278 | 278 | $instanceForm = $form->getForm($formIdentifier); |
279 | 279 | if (!isset($instanceForm)) { |
280 | - throw new \RuntimeException('No form found for "' . $formIdentifier . '"'); |
|
280 | + throw new \RuntimeException('No form found for "'.$formIdentifier.'"'); |
|
281 | 281 | } |
282 | 282 | // the id may be part of the postData, but it never should be altered |
283 | 283 | $postData = $request->getPost(); |
@@ -331,20 +331,20 @@ discard block |
||
331 | 331 | $jobValid = false; |
332 | 332 | $errorMessage[] = $this->translator->translate('Accept the Terms'); |
333 | 333 | } |
334 | - $result = $formEvents->trigger('ValidateJob', $this, [ 'form' => $form ]); |
|
334 | + $result = $formEvents->trigger('ValidateJob', $this, ['form' => $form]); |
|
335 | 335 | foreach ($result as $messages) { |
336 | 336 | if (!$messages) { |
337 | 337 | continue; |
338 | 338 | } |
339 | 339 | if (!is_array($messages)) { |
340 | - $messages = [ $messages ]; |
|
340 | + $messages = [$messages]; |
|
341 | 341 | } |
342 | 342 | |
343 | 343 | $errorMessage = array_merge($errorMessage, $messages); |
344 | 344 | $jobValid = false; |
345 | 345 | } |
346 | 346 | |
347 | - $errorMessage = '<br />' . implode('<br />', $errorMessage); |
|
347 | + $errorMessage = '<br />'.implode('<br />', $errorMessage); |
|
348 | 348 | if ($isAjax) { |
349 | 349 | if ($instanceForm instanceof SummaryForm) { |
350 | 350 | $instanceForm->setRenderMode(SummaryForm::RENDER_SUMMARY); |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | } else { |
353 | 353 | $viewHelper = 'form'; |
354 | 354 | } |
355 | - $viewHelperManager = $this->viewHelper; |
|
355 | + $viewHelperManager = $this->viewHelper; |
|
356 | 356 | $content = $viewHelperManager->get($viewHelper)->__invoke($instanceForm); |
357 | 357 | $viewModel = new JsonModel( |
358 | 358 | array( |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | } |
377 | 377 | } |
378 | 378 | } else { |
379 | - $formEvents->trigger('DisableElements', $this, [ 'form' => $form, 'job'=>$jobEntity ]); |
|
379 | + $formEvents->trigger('DisableElements', $this, ['form' => $form, 'job'=>$jobEntity]); |
|
380 | 380 | // Job is deployed, some changes are now disabled |
381 | 381 | $form->enableAll(); |
382 | 382 | } |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | |
385 | 385 | $completionLink = $this->url()->fromRoute( |
386 | 386 | 'lang/jobs/completion', |
387 | - [ 'id' => $jobEntity->getId()] |
|
387 | + ['id' => $jobEntity->getId()] |
|
388 | 388 | ); |
389 | 389 | |
390 | 390 | $viewModel = $this->getViewModel($form); |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | protected function getFormular($job) |
451 | 451 | { |
452 | 452 | /* @var $forms \Zend\Form\FormElementManager\FormElementManagerV3Polyfill */ |
453 | - $forms = $this->formManager; |
|
453 | + $forms = $this->formManager; |
|
454 | 454 | /* @var $container \Jobs\Form\Job */ |
455 | 455 | |
456 | 456 | $container = $forms->get( |
@@ -552,15 +552,15 @@ discard block |
||
552 | 552 | $jobEvent->setJobEntity($jobEntity); |
553 | 553 | $jobEvent->addPortal('XingVendorApi'); |
554 | 554 | $jobEvent->setTarget($this); |
555 | - $jobEvents = $this->jobEvents; |
|
555 | + $jobEvents = $this->jobEvents; |
|
556 | 556 | // array with differences between the last snapshot and the actual entity |
557 | 557 | // is remains Null if there is no snapshot |
558 | 558 | // it will be an empty array if the snapshot and the actual entity do not differ |
559 | - $diff = null; |
|
559 | + $diff = null; |
|
560 | 560 | |
561 | 561 | |
562 | 562 | if ($params == 'declined') { |
563 | - if ($jobEntity instanceOf JobSnapshot) { |
|
563 | + if ($jobEntity instanceOf JobSnapshot) { |
|
564 | 564 | $jobEntity->getOriginalEntity()->changeStatus( |
565 | 565 | Status::ACTIVE, |
566 | 566 | sprintf( |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | */ |
639 | 639 | public function deactivateAction() |
640 | 640 | { |
641 | - $user = $this->auth->getUser(); |
|
641 | + $user = $this->auth->getUser(); |
|
642 | 642 | |
643 | 643 | $jobEntity = $this->initializeJob()->get($this->params()); |
644 | 644 |