@@ -157,7 +157,7 @@ |
||
157 | 157 | |
158 | 158 | /** |
159 | 159 | * @param Application $application |
160 | - * @param $status |
|
160 | + * @param string $status |
|
161 | 161 | * |
162 | 162 | * @return AddressList |
163 | 163 | */ |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * |
69 | 69 | * @param ApplicationEvent $e |
70 | 70 | */ |
71 | - public function prepareFormData(ApplicationEvent $e){ |
|
71 | + public function prepareFormData(ApplicationEvent $e) { |
|
72 | 72 | if ($e->isPostRequest()) { |
73 | 73 | return; |
74 | 74 | } |
@@ -95,13 +95,13 @@ discard block |
||
95 | 95 | $key = 'mailRejectionText'; |
96 | 96 | break; |
97 | 97 | default: |
98 | - throw new \InvalidArgumentException('Unknown status value: ' .$status); |
|
98 | + throw new \InvalidArgumentException('Unknown status value: '.$status); |
|
99 | 99 | } |
100 | - $mailText = $settings->$key ? $settings->$key : ''; |
|
100 | + $mailText = $settings->$key ? $settings->$key : ''; |
|
101 | 101 | $mail->setBody($mailText); |
102 | 102 | $mail->setApplication($this->application); |
103 | 103 | $mailText = $mail->getBodyText(); |
104 | - $mailSubject = sprintf( |
|
104 | + $mailSubject = sprintf( |
|
105 | 105 | $this->translator->translate('Your application dated %s'), |
106 | 106 | strftime('%x', $this->application->getDateCreated()->getTimestamp()) |
107 | 107 | ); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | * |
122 | 122 | * @param ApplicationEvent $event |
123 | 123 | */ |
124 | - public function sendMail(ApplicationEvent $event){ |
|
124 | + public function sendMail(ApplicationEvent $event) { |
|
125 | 125 | if (!$event->isPostRequest()) { |
126 | 126 | return; |
127 | 127 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $this->mailService->send($mail); |
168 | 168 | |
169 | 169 | |
170 | - $historyText = sprintf($this->translator->translate('Mail was sent to %s'), key($recipient) ?: $recipient[0] ); |
|
170 | + $historyText = sprintf($this->translator->translate('Mail was sent to %s'), key($recipient) ?: $recipient[0]); |
|
171 | 171 | $this->application->changeStatus($status, $historyText); |
172 | 172 | $event->setNotification($historyText); |
173 | 173 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | * |
179 | 179 | * @return AddressList |
180 | 180 | */ |
181 | - protected function getRecipient( Application $application, $status) { |
|
181 | + protected function getRecipient(Application $application, $status) { |
|
182 | 182 | |
183 | 183 | $recipient = Status::ACCEPTED == $status |
184 | 184 | ? $application->getJob()->getUser()->getInfo() |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $email = $recipient->getEmail(); |
188 | 188 | $name = $recipient->getDisplayName(false); |
189 | 189 | |
190 | - return $name ? [ $email => $name ] : [ $email ]; |
|
190 | + return $name ? [$email => $name] : [$email]; |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | } |
194 | 194 | \ No newline at end of file |
@@ -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 |
@@ -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 |
@@ -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), |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | ->getHybridAuth(); |
240 | 240 | /* @var $authProfile \Hybrid_User_Profile */ |
241 | 241 | $authProfile = $hybridAuth->authenticate($network) |
242 | - ->getUserProfile(); |
|
242 | + ->getUserProfile(); |
|
243 | 243 | |
244 | 244 | /* @var \Auth\Entity\SocialProfiles\AbstractProfile $profile */ |
245 | 245 | $profile = $this->plugin('Auth/SocialProfiles')->fetch($network); |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | } |
293 | 293 | |
294 | 294 | return $this->redirect() |
295 | - ->toRoute('lang/apply', ['applyId' => $job->getApplyId()], $urlOptions); |
|
295 | + ->toRoute('lang/apply', ['applyId' => $job->getApplyId()], $urlOptions); |
|
296 | 296 | } |
297 | 297 | |
298 | 298 | public function processPreviewAction() |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | throw new \RuntimeException('Invalid application id.'); |
92 | 92 | } |
93 | 93 | |
94 | - $action = 'process'; |
|
94 | + $action = 'process'; |
|
95 | 95 | |
96 | 96 | $routeMatch->setParam('action', $action); |
97 | 97 | } else { |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | { |
183 | 183 | $this->response->setStatusCode(410); |
184 | 184 | $model = new ViewModel( |
185 | - [ 'content' => /*@translate*/ 'Invalid apply id'] |
|
185 | + ['content' => /*@translate*/ 'Invalid apply id'] |
|
186 | 186 | ); |
187 | 187 | $model->setTemplate('applications/error/not-found'); |
188 | 188 | return $model; |
@@ -360,13 +360,13 @@ discard block |
||
360 | 360 | } |
361 | 361 | |
362 | 362 | if ('previewmail' == $this->params()->fromQuery('do')) { |
363 | - $this->mailer('Applications/CarbonCopy', [ 'application' => $application], true); |
|
363 | + $this->mailer('Applications/CarbonCopy', ['application' => $application], true); |
|
364 | 364 | $this->notification()->success(/*@translate*/ 'Mail has been send'); |
365 | 365 | return new JsonModel(); |
366 | 366 | } |
367 | 367 | |
368 | 368 | if ('sendmail' == $this->params()->fromQuery('do')) { |
369 | - $jobEntity = $application->getJob(); |
|
369 | + $jobEntity = $application->getJob(); |
|
370 | 370 | |
371 | 371 | $mailData = array( |
372 | 372 | 'application' => $application, |
@@ -396,8 +396,8 @@ discard block |
||
396 | 396 | |
397 | 397 | $repositories->store($application); |
398 | 398 | |
399 | - $events = $services->get('Applications/Events'); |
|
400 | - $events->trigger(ApplicationEvent::EVENT_APPLICATION_POST_CREATE, $this, [ 'application' => $application ]); |
|
399 | + $events = $services->get('Applications/Events'); |
|
400 | + $events->trigger(ApplicationEvent::EVENT_APPLICATION_POST_CREATE, $this, ['application' => $application]); |
|
401 | 401 | |
402 | 402 | $model = new ViewModel( |
403 | 403 | array( |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | 'sendImmediately' => false |
72 | 72 | ], $options); |
73 | 73 | $view = $this->view; |
74 | - $currentTemplate = $view->viewModel() |
|
74 | + $currentTemplate = $view->viewModel() |
|
75 | 75 | ->getCurrent() |
76 | 76 | ->getTemplate(); |
77 | 77 | $partial = dirname($currentTemplate) . '/' . $options['partial']; |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | $label = $options['oneClickLabel'] ?: $view->translate('Apply with %s'); |
88 | 88 | |
89 | 89 | foreach ($data['oneClickProfiles'] as $network) { |
90 | - $variables['oneClick'][] = [ |
|
90 | + $variables['oneClick'][] = [ |
|
91 | 91 | 'label' => sprintf($label, $network), |
92 | 92 | 'url' => $view->url('lang/apply-one-click', ['applyId' => $data['applyId'], 'network' => $network, 'immediately' => $options['sendImmediately'] ?: null], ['force_canonical' => true]), |
93 | - 'network' => $network |
|
93 | + 'network' => $network |
|
94 | 94 | ]; |
95 | 95 | } |
96 | 96 | } |
@@ -98,22 +98,22 @@ discard block |
||
98 | 98 | return $view->partial($partial, $variables); |
99 | 99 | } |
100 | 100 | |
101 | - /** |
|
102 | - * @return string |
|
103 | - */ |
|
104 | - public function getPartial() |
|
105 | - { |
|
106 | - return $this->partial; |
|
107 | - } |
|
101 | + /** |
|
102 | + * @return string |
|
103 | + */ |
|
104 | + public function getPartial() |
|
105 | + { |
|
106 | + return $this->partial; |
|
107 | + } |
|
108 | 108 | |
109 | - /** |
|
110 | - * @param string $partial |
|
111 | - * @return ApplyButtons |
|
112 | - */ |
|
113 | - public function setPartial($partial) |
|
114 | - { |
|
115 | - $this->partial = $partial; |
|
109 | + /** |
|
110 | + * @param string $partial |
|
111 | + * @return ApplyButtons |
|
112 | + */ |
|
113 | + public function setPartial($partial) |
|
114 | + { |
|
115 | + $this->partial = $partial; |
|
116 | 116 | |
117 | - return $this; |
|
118 | - } |
|
117 | + return $this; |
|
118 | + } |
|
119 | 119 | } |
@@ -74,7 +74,7 @@ |
||
74 | 74 | $currentTemplate = $view->viewModel() |
75 | 75 | ->getCurrent() |
76 | 76 | ->getTemplate(); |
77 | - $partial = dirname($currentTemplate) . '/' . $options['partial']; |
|
77 | + $partial = dirname($currentTemplate).'/'.$options['partial']; |
|
78 | 78 | |
79 | 79 | if (!$options['oneClickOnly'] && $data['uri']) { |
80 | 80 | $variables['default'] = [ |