@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | if (empty($user->info->email)) { |
| 160 | 160 | return $this->getErrorViewModel('no-parent', array('cause' => 'noEmail')); |
| 161 | 161 | } |
| 162 | - $userOrg = $user->getOrganization(); |
|
| 162 | + $userOrg = $user->getOrganization(); |
|
| 163 | 163 | if (!$userOrg->hasAssociation()) { |
| 164 | 164 | return $this->getErrorViewModel('no-parent', array('cause' => 'noCompany')); |
| 165 | 165 | } |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | |
| 174 | 174 | $params = $this->params(); |
| 175 | 175 | $formIdentifier = $params->fromQuery('form'); |
| 176 | - $pageIdentifier = (int) $params->fromQuery('page', array_key_exists('page', $parameter)?$parameter['page']:0); |
|
| 176 | + $pageIdentifier = (int) $params->fromQuery('page', array_key_exists('page', $parameter) ? $parameter['page'] : 0); |
|
| 177 | 177 | $jobEntity = $this->getJob(); |
| 178 | 178 | $viewModel = null; |
| 179 | 179 | $this->acl($jobEntity, 'edit'); |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | $instanceForm = null; |
| 184 | 184 | $formErrorMessages = array(); |
| 185 | 185 | |
| 186 | - if (isset($formIdentifier) && $request->isPost()) { |
|
| 186 | + if (isset($formIdentifier) && $request->isPost()) { |
|
| 187 | 187 | // at this point the form get instantiated and immediately accumulated |
| 188 | 188 | $instanceForm = $form->getForm($formIdentifier); |
| 189 | 189 | if (!isset($instanceForm)) { |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | } else { |
| 249 | 249 | $viewHelper = 'form'; |
| 250 | 250 | } |
| 251 | - $viewHelperManager = $serviceLocator->get('ViewHelperManager'); |
|
| 251 | + $viewHelperManager = $serviceLocator->get('ViewHelperManager'); |
|
| 252 | 252 | $content = $viewHelperManager->get($viewHelper)->__invoke($instanceForm); |
| 253 | 253 | $viewModel = new JsonModel( |
| 254 | 254 | array( |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | ); |
| 302 | 302 | } |
| 303 | 303 | if ($pageIdentifier < count($pageToForm) - 1) { |
| 304 | - $pageLinkNext = $this->url()->fromRoute( |
|
| 304 | + $pageLinkNext = $this->url()->fromRoute( |
|
| 305 | 305 | 'lang/jobs/manage', |
| 306 | 306 | [], |
| 307 | 307 | [ |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | } |
| 314 | 314 | $completionLink = $this->url()->fromRoute( |
| 315 | 315 | 'lang/jobs/completion', |
| 316 | - [ 'id' => $jobEntity->getId()] |
|
| 316 | + ['id' => $jobEntity->getId()] |
|
| 317 | 317 | ); |
| 318 | 318 | |
| 319 | 319 | $viewModel = $this->getViewModel($form); |
@@ -383,13 +383,13 @@ discard block |
||
| 383 | 383 | protected function getJob($allowDraft = true) |
| 384 | 384 | { |
| 385 | 385 | /* @var \Jobs\Repository\Job $jobRepository */ |
| 386 | - $jobRepository = $this->repositoryService->get('Jobs/Job'); |
|
| 386 | + $jobRepository = $this->repositoryService->get('Jobs/Job'); |
|
| 387 | 387 | // @TODO three different method to obtain the job-id ?, simplify this |
| 388 | 388 | $id_fromRoute = $this->params('id', 0); |
| 389 | 389 | $id_fromQuery = $this->params()->fromQuery('id', 0); |
| 390 | 390 | $id_fromSubForm = $this->params()->fromPost('job', 0); |
| 391 | 391 | $user = $this->auth->getUser(); |
| 392 | - $id = empty($id_fromRoute)? (empty($id_fromQuery)?$id_fromSubForm:$id_fromQuery) : $id_fromRoute; |
|
| 392 | + $id = empty($id_fromRoute) ? (empty($id_fromQuery) ? $id_fromSubForm : $id_fromQuery) : $id_fromRoute; |
|
| 393 | 393 | |
| 394 | 394 | if (empty($id) && $allowDraft) { |
| 395 | 395 | $this->acl('Jobs/Manage', 'new'); |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | return $job; |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | - $jobEntity = $jobRepository->find($id); |
|
| 407 | + $jobEntity = $jobRepository->find($id); |
|
| 408 | 408 | if (!$jobEntity) { |
| 409 | 409 | throw new \RuntimeException('No job found with id "' . $id . '"'); |
| 410 | 410 | } |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | // array with differences between the last snapshot and the actual entity |
| 486 | 486 | // is remains Null if there is no snapshot |
| 487 | 487 | // it will be an empty array if the snapshot and the actual entity do not differ |
| 488 | - $diff = null; |
|
| 488 | + $diff = null; |
|
| 489 | 489 | // preliminary difference, contain all differences |
| 490 | 490 | $prelDiff = $this->entitySnapshot()->diff($jobEntity); |
| 491 | 491 | if (isset($prelDiff)) { |
@@ -521,21 +521,21 @@ discard block |
||
| 521 | 521 | 'lang/jobs/view', |
| 522 | 522 | array(), |
| 523 | 523 | array('query' => |
| 524 | - array( 'id' => $jobEntity->getId())) |
|
| 524 | + array('id' => $jobEntity->getId())) |
|
| 525 | 525 | ); |
| 526 | 526 | |
| 527 | 527 | $approvalLink = $this->url()->fromRoute( |
| 528 | 528 | 'lang/jobs/approval', |
| 529 | 529 | array('state' => 'approved'), |
| 530 | 530 | array('query' => |
| 531 | - array( 'id' => $jobEntity->getId())) |
|
| 531 | + array('id' => $jobEntity->getId())) |
|
| 532 | 532 | ); |
| 533 | 533 | |
| 534 | 534 | $declineLink = $this->url()->fromRoute( |
| 535 | 535 | 'lang/jobs/approval', |
| 536 | 536 | array('state' => 'declined'), |
| 537 | 537 | array('query' => |
| 538 | - array( 'id' => $jobEntity->getId())) |
|
| 538 | + array('id' => $jobEntity->getId())) |
|
| 539 | 539 | ); |
| 540 | 540 | |
| 541 | 541 | return array('job' => $jobEntity, |
@@ -572,7 +572,7 @@ discard block |
||
| 572 | 572 | public function templateAction() |
| 573 | 573 | { |
| 574 | 574 | try { |
| 575 | - $jobEntity = $this->getJob(); |
|
| 575 | + $jobEntity = $this->getJob(); |
|
| 576 | 576 | $jobEntity->setTemplate($this->params('template', 'default')); |
| 577 | 577 | $this->repositoryService->store($jobEntity); |
| 578 | 578 | $this->notification()->success($this->translator->translate('Template changed')); |
@@ -30,9 +30,9 @@ |
||
| 30 | 30 | $serviceLocator = $serviceLocator->getServiceLocator(); |
| 31 | 31 | $auth = $serviceLocator->get('AuthenticationService'); |
| 32 | 32 | /* @var RepositoryService $repositoryService */ |
| 33 | - $repositoryService = $serviceLocator->get('repositories'); |
|
| 33 | + $repositoryService = $serviceLocator->get('repositories'); |
|
| 34 | 34 | |
| 35 | - $translator = $serviceLocator->get('translator'); |
|
| 35 | + $translator = $serviceLocator->get('translator'); |
|
| 36 | 36 | return new ManageController($auth, $repositoryService, $translator); |
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | \ No newline at end of file |