@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * @param bool $acceptApplicationByDepartmentManager |
18 | 18 | * @return WorkflowSettings |
19 | 19 | */ |
20 | - public function setAcceptApplicationByDepartmentManager( $acceptApplicationByDepartmentManager ); |
|
20 | + public function setAcceptApplicationByDepartmentManager($acceptApplicationByDepartmentManager); |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Gets AcceptApplicationByDepartmentManager |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * @param bool $assignDepartmentManagersToJobs |
33 | 33 | * @return WorkflowSettings |
34 | 34 | */ |
35 | - public function setAssignDepartmentManagersToJobs( $assignDepartmentManagersToJobs ); |
|
35 | + public function setAssignDepartmentManagersToJobs($assignDepartmentManagersToJobs); |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * Gets AssignDepartmentManagersToJobs |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | */ |
336 | 336 | public function getPermissionsResourceId() |
337 | 337 | { |
338 | - return 'organization:' . $this->getId(); |
|
338 | + return 'organization:'.$this->getId(); |
|
339 | 339 | } |
340 | 340 | |
341 | 341 | /** |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | * @param string $role |
548 | 548 | * @return ArrayCollection |
549 | 549 | */ |
550 | - public function getEmployeesByRole($role){ |
|
550 | + public function getEmployeesByRole($role) { |
|
551 | 551 | $employees = new ArrayCollection(); |
552 | 552 | |
553 | 553 | /* @var \Organizations\Entity\Employee $employee */ |
@@ -665,7 +665,7 @@ discard block |
||
665 | 665 | */ |
666 | 666 | public function getTemplate() |
667 | 667 | { |
668 | - if (null === $this->template){ |
|
668 | + if (null === $this->template) { |
|
669 | 669 | $this->template = new Template(); |
670 | 670 | } |
671 | 671 | return $this->template; |
@@ -678,7 +678,7 @@ discard block |
||
678 | 678 | */ |
679 | 679 | public function setTemplate(TemplateInterface $template) |
680 | 680 | { |
681 | - $this->template=$template; |
|
681 | + $this->template = $template; |
|
682 | 682 | return $this; |
683 | 683 | } |
684 | 684 | |
@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | * |
688 | 688 | * @return WorkflowSettings|WorkflowSettingsInterface |
689 | 689 | */ |
690 | - public function getWorkflowSettings(){ |
|
690 | + public function getWorkflowSettings() { |
|
691 | 691 | if (null == $this->workflowSettings) { |
692 | 692 | $this->workflowSettings = new WorkflowSettings(); |
693 | 693 | } |
@@ -701,8 +701,8 @@ discard block |
||
701 | 701 | * |
702 | 702 | * @return self |
703 | 703 | */ |
704 | - public function setWorkflowSettings($workflowSettings){ |
|
705 | - $this->workflowSettings=$workflowSettings; |
|
704 | + public function setWorkflowSettings($workflowSettings) { |
|
705 | + $this->workflowSettings = $workflowSettings; |
|
706 | 706 | return $this; |
707 | 707 | } |
708 | 708 | } |
709 | 709 | \ No newline at end of file |
@@ -40,9 +40,9 @@ discard block |
||
40 | 40 | * @param bool $acceptApplicationByDepartmentManager |
41 | 41 | * @return WorkflowSettings |
42 | 42 | */ |
43 | - public function setAcceptApplicationByDepartmentManager( $acceptApplicationByDepartmentManager ) |
|
43 | + public function setAcceptApplicationByDepartmentManager($acceptApplicationByDepartmentManager) |
|
44 | 44 | { |
45 | - $this->acceptApplicationByDepartmentManager= $acceptApplicationByDepartmentManager; |
|
45 | + $this->acceptApplicationByDepartmentManager = $acceptApplicationByDepartmentManager; |
|
46 | 46 | return $this; |
47 | 47 | } |
48 | 48 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * @param bool $assignDepartmentManagersToJobs |
63 | 63 | * @return WorkflowSettings |
64 | 64 | */ |
65 | - public function setAssignDepartmentManagersToJobs( $assignDepartmentManagersToJobs ) |
|
65 | + public function setAssignDepartmentManagersToJobs($assignDepartmentManagersToJobs) |
|
66 | 66 | { |
67 | 67 | $this->assignDepartmentManagersToJobs = $assignDepartmentManagersToJobs; |
68 | 68 | return $this; |
@@ -142,7 +142,7 @@ |
||
142 | 142 | /** |
143 | 143 | * @return bool |
144 | 144 | */ |
145 | - public function getAutoConfirmMail(){ |
|
145 | + public function getAutoConfirmMail() { |
|
146 | 146 | return $this->autoConfirmMail; |
147 | 147 | } |
148 | 148 | } |
@@ -30,17 +30,17 @@ discard block |
||
30 | 30 | /** |
31 | 31 | * Event is fired when a new application is saved. |
32 | 32 | */ |
33 | - const EVENT_APPLICATION_POST_CREATE = 'application.post.create'; |
|
33 | + const EVENT_APPLICATION_POST_CREATE = 'application.post.create'; |
|
34 | 34 | |
35 | 35 | /** |
36 | 36 | * Event is fired when a users deleted application |
37 | 37 | */ |
38 | - const EVENT_APPLICATION_PRE_DELETE = 'application.pre.delete'; |
|
38 | + const EVENT_APPLICATION_PRE_DELETE = 'application.pre.delete'; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * Event is fired when the status of an application is changed |
42 | 42 | */ |
43 | - const EVENT_APPLICATION_STATUS_CHANGE = 'application.status.change'; |
|
43 | + const EVENT_APPLICATION_STATUS_CHANGE = 'application.status.change'; |
|
44 | 44 | |
45 | 45 | /** |
46 | 46 | * @var Application $application |
@@ -233,12 +233,12 @@ discard block |
||
233 | 233 | $this->setApplicationEntity($params->application); |
234 | 234 | } |
235 | 235 | |
236 | - if(is_array($params) && isset($params['user'])) { |
|
236 | + if (is_array($params) && isset($params['user'])) { |
|
237 | 237 | $this->setUser($params['user']); |
238 | 238 | unset($params['user']); |
239 | 239 | } |
240 | 240 | |
241 | - if(is_array($params) && isset($params['status'])) { |
|
241 | + if (is_array($params) && isset($params['status'])) { |
|
242 | 242 | $this->setStatus($params['status']); |
243 | 243 | unset($params['status']); |
244 | 244 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
141 | - * @param $notification |
|
141 | + * @param string $notification |
|
142 | 142 | * |
143 | 143 | * @return $this |
144 | 144 | */ |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | } |
169 | 169 | |
170 | 170 | /** |
171 | - * @return mixed |
|
171 | + * @return string |
|
172 | 172 | */ |
173 | 173 | public function getStatus() |
174 | 174 | { |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
179 | - * @return mixed |
|
179 | + * @return boolean |
|
180 | 180 | */ |
181 | 181 | public function isPostRequest() |
182 | 182 | { |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $params->set('by', 'me'); |
41 | 41 | } |
42 | 42 | |
43 | - //default sorting |
|
43 | + //default sorting |
|
44 | 44 | if (!isset($params['sort'])) { |
45 | 45 | $params['sort']="-date"; |
46 | 46 | } |
@@ -42,10 +42,10 @@ |
||
42 | 42 | |
43 | 43 | //default sorting |
44 | 44 | if (!isset($params['sort'])) { |
45 | - $params['sort']="-date"; |
|
45 | + $params['sort'] = "-date"; |
|
46 | 46 | } |
47 | 47 | $params->count = 5; |
48 | - $params->pageRange=5; |
|
48 | + $params->pageRange = 5; |
|
49 | 49 | |
50 | 50 | $this->paginationParams()->setParams('Applications\Index', $params); |
51 | 51 |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $application->changeStatus( |
147 | 147 | $application->getStatus(), |
148 | 148 | sprintf(/*@translate*/ 'Application was read by %s', |
149 | - $this->auth()->getUser()->getInfo()->getDisplayName())); |
|
149 | + $this->auth()->getUser()->getInfo()->getDisplayName())); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | |
@@ -173,9 +173,9 @@ discard block |
||
173 | 173 | $viewModel->setVariables( |
174 | 174 | /*array( |
175 | 175 | 'application' => */$this->getServiceLocator() |
176 | - ->get('builders') |
|
177 | - ->get('JsonApplication') |
|
178 | - ->unbuild($application) |
|
176 | + ->get('builders') |
|
177 | + ->get('JsonApplication') |
|
178 | + ->unbuild($application) |
|
179 | 179 | ); |
180 | 180 | $viewModel->setVariable('isUnread', $applicationIsUnread); |
181 | 181 | $return = $viewModel; |
@@ -297,12 +297,12 @@ discard block |
||
297 | 297 | |
298 | 298 | /* @var ApplicationEvent $event */ |
299 | 299 | $event = $events->getEvent(ApplicationEvent::EVENT_APPLICATION_STATUS_CHANGE, |
300 | - $this, |
|
301 | - [ |
|
302 | - 'application' => $application, |
|
303 | - 'status' => $status, |
|
304 | - 'user' => $this->auth()->getUser(), |
|
305 | - ] |
|
300 | + $this, |
|
301 | + [ |
|
302 | + 'application' => $application, |
|
303 | + 'status' => $status, |
|
304 | + 'user' => $this->auth()->getUser(), |
|
305 | + ] |
|
306 | 306 | ); |
307 | 307 | |
308 | 308 | $event->setIsPostRequest($request->isPost()); |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | $emailAddress = $this->params()->fromQuery('email'); |
354 | 354 | /* @var \Applications\Entity\Application $application */ |
355 | 355 | $application = $services->get('repositories')->get('Applications/Application') |
356 | - ->find($this->params('id')); |
|
356 | + ->find($this->params('id')); |
|
357 | 357 | |
358 | 358 | $this->acl($application, 'forward'); |
359 | 359 |
@@ -85,11 +85,11 @@ discard block |
||
85 | 85 | } |
86 | 86 | $statusElement->setValueOptions($statesForSelections); |
87 | 87 | |
88 | - $job = $params->job ? $jobRepository->find($params->job) : null; |
|
88 | + $job = $params->job ? $jobRepository->find($params->job) : null; |
|
89 | 89 | $paginator = $this->paginator('Applications'); |
90 | 90 | |
91 | 91 | if ($job) { |
92 | - $params['job_title'] = '[' . $job->getApplyId() . '] ' . $job->getTitle(); |
|
92 | + $params['job_title'] = '['.$job->getApplyId().'] '.$job->getTitle(); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | $form->bind($params); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | |
152 | 152 | |
153 | 153 | |
154 | - $format=$this->params()->fromQuery('format'); |
|
154 | + $format = $this->params()->fromQuery('format'); |
|
155 | 155 | |
156 | 156 | if ($application->isDraft()) { |
157 | 157 | $list = false; |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | && ($network = $this->params()->fromQuery('network')) |
239 | 239 | && ($data = $this->params()->fromPost('data')) |
240 | 240 | ) { |
241 | - $profileClass = '\\Auth\\Entity\\SocialProfiles\\' . $network; |
|
241 | + $profileClass = '\\Auth\\Entity\\SocialProfiles\\'.$network; |
|
242 | 242 | $profile = new $profileClass(); |
243 | 243 | $profile->setData(\Zend\Json\Json::decode($data, \Zend\Json\Json::TYPE_ARRAY)); |
244 | 244 | } else { |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | |
358 | 358 | $this->acl($application, 'forward'); |
359 | 359 | |
360 | - $translator = $services->get('translator'); |
|
360 | + $translator = $services->get('translator'); |
|
361 | 361 | |
362 | 362 | if (!$emailAddress) { |
363 | 363 | throw new \InvalidArgumentException('An email address must be supplied.'); |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | { |
399 | 399 | $id = $this->params('id'); |
400 | 400 | $services = $this->getServiceLocator(); |
401 | - $repositories= $services->get('repositories'); |
|
401 | + $repositories = $services->get('repositories'); |
|
402 | 402 | $repository = $repositories->get('Applications/Application'); |
403 | 403 | $application = $repository->find($id); |
404 | 404 | |
@@ -408,8 +408,8 @@ discard block |
||
408 | 408 | |
409 | 409 | $this->acl($application, 'delete'); |
410 | 410 | |
411 | - $events = $services->get('Applications/Events'); |
|
412 | - $events->trigger(ApplicationEvent::EVENT_APPLICATION_PRE_DELETE, $this, [ 'application' => $application ]); |
|
411 | + $events = $services->get('Applications/Events'); |
|
412 | + $events->trigger(ApplicationEvent::EVENT_APPLICATION_PRE_DELETE, $this, ['application' => $application]); |
|
413 | 413 | |
414 | 414 | $repositories->remove($application); |
415 | 415 |
@@ -46,7 +46,7 @@ |
||
46 | 46 | ) |
47 | 47 | ); |
48 | 48 | |
49 | - $timezones=array_merge( |
|
49 | + $timezones = array_merge( |
|
50 | 50 | \DateTimeZone::listIdentifiers(\DateTimeZone::AFRICA), |
51 | 51 | \DateTimeZone::listIdentifiers(\DateTimeZone::AMERICA), |
52 | 52 | \DateTimeZone::listIdentifiers(\DateTimeZone::ASIA), |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | if (null === $buttonContent) { |
29 | 29 | throw new Exception\DomainException( |
30 | 30 | sprintf( |
31 | - '%s expects either button content as the second argument, ' . |
|
31 | + '%s expects either button content as the second argument, '. |
|
32 | 32 | 'or that the element provided has a label value; neither found', |
33 | 33 | __METHOD__ |
34 | 34 | ) |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $checkedBoole = ($value == 1 || $value == 'on'); |
52 | 52 | |
53 | 53 | //$checked = $checkedBoole?'checked="checked"':''; |
54 | - $checkedClass = $checkedBoole?'active"':''; |
|
54 | + $checkedClass = $checkedBoole ? 'active"' : ''; |
|
55 | 55 | |
56 | 56 | $hiddenElement = ''; |
57 | 57 | if ($element->useHiddenElement()) { |
@@ -68,11 +68,11 @@ discard block |
||
68 | 68 | $element->setUseHiddenElement(false); |
69 | 69 | } |
70 | 70 | |
71 | - $buttonContent = $hiddenElement . PHP_EOL |
|
72 | - . '<div class="btn-group" data-toggle="buttons">' . PHP_EOL |
|
73 | - . '<label class="btn btn-default ' . $checkedClass . '">' . PHP_EOL |
|
74 | - . parent::render($element) . $buttonContent . PHP_EOL . '</label>' . PHP_EOL |
|
75 | - . '</div>' . PHP_EOL; |
|
71 | + $buttonContent = $hiddenElement.PHP_EOL |
|
72 | + . '<div class="btn-group" data-toggle="buttons">'.PHP_EOL |
|
73 | + . '<label class="btn btn-default '.$checkedClass.'">'.PHP_EOL |
|
74 | + . parent::render($element).$buttonContent.PHP_EOL.'</label>'.PHP_EOL |
|
75 | + . '</div>'.PHP_EOL; |
|
76 | 76 | |
77 | 77 | //$buttonContent = '<div><div class="processing yk-hidden"><span class="fa-spin yk-icon-spinner yk-icon"></span> ' . |
78 | 78 | // $translator->translate('processing', $this->getTranslatorTextDomain()) . '</div><div class="default">' . $escape($buttonContent) . '</div></div>'; |