@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | protected $service; |
38 | 38 | |
39 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
39 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
40 | 40 | { |
41 | 41 | $this->service = $container; |
42 | 42 | return $this; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $filter->setViewHelperForm($viewHelperForm); |
62 | 62 | } |
63 | 63 | if (!isset($filter)) { |
64 | - throw new \InvalidArgumentException(get_class($element) . ' cannot be used to initialize a template'); |
|
64 | + throw new \InvalidArgumentException(get_class($element).' cannot be used to initialize a template'); |
|
65 | 65 | } |
66 | 66 | $viewManager = $this->service->get('ViewHelperManager'); |
67 | 67 | $basePathHelper = $viewManager->get('basePath'); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $filter->setImageFileCacheHelper($imageFileCacheHelper); |
72 | 72 | $filter->setServerUrlHelper($serverUrlHelper); |
73 | 73 | |
74 | - if($filter instanceof ViewModelTemplateFilterJob || method_exists($filter,'setJsonLdHelper')){ |
|
74 | + if ($filter instanceof ViewModelTemplateFilterJob || method_exists($filter, 'setJsonLdHelper')) { |
|
75 | 75 | $jsonLdHelper = $viewManager->get(JsonLd::class); |
76 | 76 | $filter->setJsonLdHelper($jsonLdHelper); |
77 | 77 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | $params = $viewHelper->get('params'); |
48 | 48 | $serverUrl = $viewHelper->get('serverUrl'); |
49 | 49 | |
50 | - $helper = new JobUrl(); |
|
50 | + $helper = new JobUrl(); |
|
51 | 51 | $helper->setUrlHelper($url) |
52 | 52 | ->setParamsHelper($params) |
53 | 53 | ->setServerUrlHelper($serverUrl); |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $params = $viewHelper->get('params'); |
45 | 45 | $serverUrl = $viewHelper->get('serverUrl'); |
46 | 46 | |
47 | - $helper = new ApplyUrl(); |
|
47 | + $helper = new ApplyUrl(); |
|
48 | 48 | $helper->setUrlHelper($url) |
49 | 49 | ->setTranslateHelper($translate) |
50 | 50 | ->setParamsHelper($params) |
@@ -33,8 +33,8 @@ |
||
33 | 33 | { |
34 | 34 | $auth = $container->get('AuthenticationService'); |
35 | 35 | /* @var RepositoryService $repositoryService */ |
36 | - $repositoryService = $container->get('repositories'); |
|
37 | - $translator = $container->get('translator'); |
|
36 | + $repositoryService = $container->get('repositories'); |
|
37 | + $translator = $container->get('translator'); |
|
38 | 38 | $filterManager = $container->get('FilterManager'); |
39 | 39 | $jobFormEvents = $container->get('Jobs/JobContainer/Events'); |
40 | 40 | $formManager = $container->get('FormElementManager'); |
@@ -26,15 +26,15 @@ |
||
26 | 26 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { |
27 | 27 | |
28 | 28 | /* @var \Jobs\Options\JobboardSearchOptions $options */ |
29 | - $options = $container->get( 'Jobs/JobboardSearchOptions' ); |
|
29 | + $options = $container->get('Jobs/JobboardSearchOptions'); |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * @var $jobRepository Repository\Job |
33 | 33 | */ |
34 | - $jobRepository = $container->get( 'repositories' )->get( 'Jobs/Job' ); |
|
35 | - $defaultListener = $container->get( 'DefaultListeners' ); |
|
36 | - $imageFileCacheManager = $container->get( 'Organizations\ImageFileCache\Manager' ); |
|
34 | + $jobRepository = $container->get('repositories')->get('Jobs/Job'); |
|
35 | + $defaultListener = $container->get('DefaultListeners'); |
|
36 | + $imageFileCacheManager = $container->get('Organizations\ImageFileCache\Manager'); |
|
37 | 37 | |
38 | - return new JobboardController( $defaultListener, $jobRepository, $imageFileCacheManager, [ 'count' => $options->getPerPage() ] ); |
|
38 | + return new JobboardController($defaultListener, $jobRepository, $imageFileCacheManager, ['count' => $options->getPerPage()]); |
|
39 | 39 | } |
40 | 40 | } |
@@ -66,7 +66,7 @@ |
||
66 | 66 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
67 | 67 | { |
68 | 68 | $factory = $this->getParentFactory(); |
69 | - $select = $factory($container,$requestedName); |
|
69 | + $select = $factory($container, $requestedName); |
|
70 | 70 | $select->setViewPartial('jobs/form/multiposting-checkboxes'); |
71 | 71 | $select->setHeadscripts(array('Jobs/js/form.multiposting-checkboxes.js')); |
72 | 72 | return $select; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | public function attachDefaultListeners() |
69 | 69 | { |
70 | 70 | parent::attachDefaultListeners(); |
71 | - $events = $this->getEventManager(); |
|
71 | + $events = $this->getEventManager(); |
|
72 | 72 | $this->defaultListener->attach($events); |
73 | 73 | return $this; |
74 | 74 | } |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | $request = $this->getRequest(); |
92 | 92 | $getParams = $request->getQuery(); |
93 | 93 | $routeParams = $this->params()->fromRoute(); |
94 | - if (isset($routeParams['q']) && !isset($getParams['q'])){ |
|
95 | - $getParams['q']=$routeParams['q']; |
|
94 | + if (isset($routeParams['q']) && !isset($getParams['q'])) { |
|
95 | + $getParams['q'] = $routeParams['q']; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | $result = $this->pagination([ |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | return $ob; |
46 | 46 | } |
47 | 47 | |
48 | - public function setContainer( ContainerInterface $container ) |
|
48 | + public function setContainer(ContainerInterface $container) |
|
49 | 49 | { |
50 | 50 | $this->repositories = $container->get('repositories'); |
51 | 51 | $this->formManager = $container->get('forms'); |
@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | { |
58 | 58 | $params = $this->params()->fromQuery(); |
59 | 59 | return $this->pagination([ |
60 | - 'params' => [ 'Jobs_Admin', ['text', 'page' => 1, 'companyId', 'status' ] ], |
|
61 | - 'form' => [ 'as' => 'form', 'Jobs/AdminSearch' ], |
|
62 | - 'paginator' => [ 'as' => 'jobs', 'Jobs/Admin' ], |
|
60 | + 'params' => ['Jobs_Admin', ['text', 'page' => 1, 'companyId', 'status']], |
|
61 | + 'form' => ['as' => 'form', 'Jobs/AdminSearch'], |
|
62 | + 'paginator' => ['as' => 'jobs', 'Jobs/Admin'], |
|
63 | 63 | ]); |
64 | 64 | } |
65 | 65 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $oldStatus = $job->getStatus(); |
85 | 85 | $job->changeStatus($post['statusselect'], '[System] Status changed via Admin GUI.'); |
86 | 86 | $events = $this->jobEvents; |
87 | - $events->trigger(JobEvent::EVENT_STATUS_CHANGED, $this, [ 'job' => $job, 'status' => $oldStatus ]); |
|
87 | + $events->trigger(JobEvent::EVENT_STATUS_CHANGED, $this, ['job' => $job, 'status' => $oldStatus]); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | $form->bind($job); |
98 | 98 | |
99 | - return [ 'form' => $form, 'job' => $job ]; |
|
99 | + return ['form' => $form, 'job' => $job]; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | } |
@@ -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,7 +554,7 @@ 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') { |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | */ |
614 | 614 | public function deactivateAction() |
615 | 615 | { |
616 | - $user = $this->auth->getUser(); |
|
616 | + $user = $this->auth->getUser(); |
|
617 | 617 | |
618 | 618 | $jobEntity = $this->initializeJob()->get($this->params()); |
619 | 619 |