@@ -226,11 +226,11 @@ discard block |
||
226 | 226 | protected function save() |
227 | 227 | { |
228 | 228 | $formEvents = $this->jobFormEvents; |
229 | - $user = $this->auth->getUser(); |
|
229 | + $user = $this->auth->getUser(); |
|
230 | 230 | if (empty($user->getInfo()->getEmail())) { |
231 | 231 | return $this->getErrorViewModel('no-parent', array('cause' => 'noEmail')); |
232 | 232 | } |
233 | - $userOrg = $user->getOrganization(); |
|
233 | + $userOrg = $user->getOrganization(); |
|
234 | 234 | if (!$userOrg->hasAssociation() || $userOrg->getOrganization()->isDraft()) { |
235 | 235 | return $this->getErrorViewModel('no-parent', array('cause' => 'noCompany')); |
236 | 236 | } |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | } |
261 | 261 | |
262 | 262 | |
263 | - $viewModel = null; |
|
263 | + $viewModel = null; |
|
264 | 264 | $this->acl($jobEntity, 'edit'); |
265 | 265 | if ($status = $params->fromQuery('status')) { |
266 | 266 | $this->changeStatus($jobEntity, $status); |
@@ -272,11 +272,11 @@ discard block |
||
272 | 272 | $instanceForm = null; |
273 | 273 | $formErrorMessages = array(); |
274 | 274 | |
275 | - if (isset($formIdentifier) && $request->isPost()) { |
|
275 | + if (isset($formIdentifier) && $request->isPost()) { |
|
276 | 276 | // at this point the form get instantiated and immediately accumulated |
277 | 277 | $instanceForm = $form->getForm($formIdentifier); |
278 | 278 | if (!isset($instanceForm)) { |
279 | - throw new \RuntimeException('No form found for "' . $formIdentifier . '"'); |
|
279 | + throw new \RuntimeException('No form found for "'.$formIdentifier.'"'); |
|
280 | 280 | } |
281 | 281 | // the id may be part of the postData, but it never should be altered |
282 | 282 | $postData = $request->getPost(); |
@@ -330,20 +330,20 @@ discard block |
||
330 | 330 | $jobValid = false; |
331 | 331 | $errorMessage[] = $this->translator->translate('Accept the Terms'); |
332 | 332 | } |
333 | - $result = $formEvents->trigger('ValidateJob', $this, [ 'form' => $form ]); |
|
333 | + $result = $formEvents->trigger('ValidateJob', $this, ['form' => $form]); |
|
334 | 334 | foreach ($result as $messages) { |
335 | 335 | if (!$messages) { |
336 | 336 | continue; |
337 | 337 | } |
338 | 338 | if (!is_array($messages)) { |
339 | - $messages = [ $messages ]; |
|
339 | + $messages = [$messages]; |
|
340 | 340 | } |
341 | 341 | |
342 | 342 | $errorMessage = array_merge($errorMessage, $messages); |
343 | 343 | $jobValid = false; |
344 | 344 | } |
345 | 345 | |
346 | - $errorMessage = '<br />' . implode('<br />', $errorMessage); |
|
346 | + $errorMessage = '<br />'.implode('<br />', $errorMessage); |
|
347 | 347 | if ($isAjax) { |
348 | 348 | if ($instanceForm instanceof SummaryForm) { |
349 | 349 | $instanceForm->setRenderMode(SummaryForm::RENDER_SUMMARY); |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | } else { |
352 | 352 | $viewHelper = 'form'; |
353 | 353 | } |
354 | - $viewHelperManager = $this->viewHelper; |
|
354 | + $viewHelperManager = $this->viewHelper; |
|
355 | 355 | $content = $viewHelperManager->get($viewHelper)->__invoke($instanceForm); |
356 | 356 | $viewModel = new JsonModel( |
357 | 357 | array( |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | } |
376 | 376 | } |
377 | 377 | } else { |
378 | - $formEvents->trigger('DisableElements', $this, [ 'form' => $form, 'job'=>$jobEntity ]); |
|
378 | + $formEvents->trigger('DisableElements', $this, ['form' => $form, 'job'=>$jobEntity]); |
|
379 | 379 | // Job is deployed, some changes are now disabled |
380 | 380 | $form->enableAll(); |
381 | 381 | } |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | |
384 | 384 | $completionLink = $this->url()->fromRoute( |
385 | 385 | 'lang/jobs/completion', |
386 | - [ 'id' => $jobEntity->getId()] |
|
386 | + ['id' => $jobEntity->getId()] |
|
387 | 387 | ); |
388 | 388 | |
389 | 389 | $viewModel = $this->getViewModel($form); |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | protected function getFormular($job) |
450 | 450 | { |
451 | 451 | /* @var $forms \Zend\Form\FormElementManager\FormElementManagerV3Polyfill */ |
452 | - $forms = $this->formManager; |
|
452 | + $forms = $this->formManager; |
|
453 | 453 | /* @var $container \Jobs\Form\Job */ |
454 | 454 | |
455 | 455 | $container = $forms->get( |
@@ -554,11 +554,11 @@ discard block |
||
554 | 554 | // array with differences between the last snapshot and the actual entity |
555 | 555 | // is remains Null if there is no snapshot |
556 | 556 | // it will be an empty array if the snapshot and the actual entity do not differ |
557 | - $diff = null; |
|
557 | + $diff = null; |
|
558 | 558 | |
559 | 559 | |
560 | 560 | if ($params == 'declined') { |
561 | - if ($jobEntity instanceOf JobSnapshot) { |
|
561 | + if ($jobEntity instanceOf JobSnapshot) { |
|
562 | 562 | $jobEntity->getOriginalEntity()->changeStatus(Status::ACTIVE, sprintf(/*@translate*/ 'Changes were rejected by %s', $user->getDisplayName())); |
563 | 563 | } else { |
564 | 564 | $jobEntity->changeStatus( |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | */ |
624 | 624 | public function deactivateAction() |
625 | 625 | { |
626 | - $user = $this->auth->getUser(); |
|
626 | + $user = $this->auth->getUser(); |
|
627 | 627 | |
628 | 628 | $jobEntity = $this->initializeJob()->get($this->params()); |
629 | 629 |