|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* YAWIK |
|
4
|
|
|
* |
|
5
|
|
|
* @filesource |
|
6
|
|
|
* @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de) |
|
7
|
|
|
* @license MIT |
|
8
|
|
|
*/ |
|
9
|
|
|
|
|
10
|
|
|
/** Applications controller */ |
|
11
|
|
|
namespace Applications\Controller; |
|
12
|
|
|
|
|
13
|
|
|
use Applications\Form\ApplicationsFilter; |
|
14
|
|
|
use Applications\Listener\Events\ApplicationEvent; |
|
15
|
|
|
use Zend\Mvc\Controller\AbstractActionController; |
|
16
|
|
|
use Zend\View\Model\ViewModel; |
|
17
|
|
|
use Zend\View\Model\JsonModel; |
|
18
|
|
|
use Applications\Entity\StatusInterface as Status; |
|
19
|
|
|
use Applications\Entity\Application; |
|
20
|
|
|
|
|
21
|
|
|
/** |
|
22
|
|
|
* @method \Core\Controller\Plugin\Notification notification() |
|
23
|
|
|
* @method \Core\Controller\Plugin\Mailer mailer() |
|
24
|
|
|
* @method \Acl\Controller\Plugin\Acl acl() |
|
25
|
|
|
* @method \Auth\Controller\Plugin\Auth auth() |
|
26
|
|
|
* |
|
27
|
|
|
* Handles managing actions on applications |
|
28
|
|
|
*/ |
|
29
|
|
|
class ManageController extends AbstractActionController |
|
30
|
|
|
{ |
|
31
|
|
|
/** |
|
32
|
|
|
* attaches further Listeners for generating / processing the output |
|
33
|
|
|
* |
|
34
|
|
|
* @return $this |
|
35
|
|
|
*/ |
|
36
|
|
View Code Duplication |
public function attachDefaultListeners() |
|
|
|
|
|
|
37
|
|
|
{ |
|
38
|
|
|
parent::attachDefaultListeners(); |
|
39
|
|
|
$serviceLocator = $this->serviceLocator; |
|
40
|
|
|
$defaultServices = $serviceLocator->get('DefaultListeners'); |
|
41
|
|
|
$events = $this->getEventManager(); |
|
42
|
|
|
$events->attach($defaultServices); |
|
|
|
|
|
|
43
|
|
|
return $this; |
|
44
|
|
|
} |
|
45
|
|
|
|
|
46
|
|
|
/** |
|
47
|
|
|
* (non-PHPdoc) |
|
48
|
|
|
* @see \Zend\Mvc\Controller\AbstractActionController::onDispatch() |
|
49
|
|
|
*/ |
|
50
|
|
|
public function onDispatch(\Zend\Mvc\MvcEvent $e) |
|
51
|
|
|
{ |
|
52
|
|
|
$routeMatch = $e->getRouteMatch(); |
|
53
|
|
|
$action = $this->params()->fromQuery('action'); |
|
54
|
|
|
|
|
55
|
|
|
if ($routeMatch && $action) { |
|
56
|
|
|
$routeMatch->setParam('action', $action); |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
return parent::onDispatch($e); |
|
60
|
|
|
} |
|
61
|
|
|
|
|
62
|
|
|
/** |
|
63
|
|
|
* List applications |
|
64
|
|
|
*/ |
|
65
|
|
View Code Duplication |
public function indexAction() |
|
|
|
|
|
|
66
|
|
|
{ |
|
67
|
|
|
return $this->pagination([ |
|
|
|
|
|
|
68
|
|
|
'params' => ['Application_List', ['q', 'job', 'page' => 1, 'unread', 'status' => 'all']], |
|
69
|
|
|
'paginator' => ['Applications', 'as' => 'applications'], |
|
70
|
|
|
'form' => [ |
|
71
|
|
|
ApplicationsFilter::class, |
|
72
|
|
|
'as' => 'form' |
|
73
|
|
|
], |
|
74
|
|
|
]); |
|
75
|
|
|
} |
|
76
|
|
|
|
|
77
|
|
|
/** |
|
78
|
|
|
* Detail view of an application |
|
79
|
|
|
* |
|
80
|
|
|
* @return array|JsonModel|ViewModel |
|
81
|
|
|
*/ |
|
82
|
|
|
public function detailAction() |
|
83
|
|
|
{ |
|
84
|
|
|
if ('refresh-rating' == $this->params()->fromQuery('do')) { |
|
85
|
|
|
return $this->refreshRatingAction(); |
|
86
|
|
|
} |
|
87
|
|
|
|
|
88
|
|
|
$nav = $this->serviceLocator->get('Core/Navigation'); |
|
89
|
|
|
$page = $nav->findByRoute('lang/applications'); |
|
90
|
|
|
$page->setActive(); |
|
91
|
|
|
|
|
92
|
|
|
/* @var \Applications\Repository\Application$repository */ |
|
93
|
|
|
$repository = $this->serviceLocator->get('repositories')->get('Applications/Application'); |
|
94
|
|
|
/* @var Application $application */ |
|
95
|
|
|
$application = $repository->find($this->params('id')); |
|
96
|
|
|
|
|
97
|
|
|
if (!$application) { |
|
98
|
|
|
$this->response->setStatusCode(410); |
|
|
|
|
|
|
99
|
|
|
$model = new ViewModel( |
|
100
|
|
|
array( |
|
101
|
|
|
'content' => /*@translate*/ 'Invalid apply id' |
|
102
|
|
|
) |
|
103
|
|
|
); |
|
104
|
|
|
$model->setTemplate('applications/error/not-found'); |
|
105
|
|
|
return $model; |
|
106
|
|
|
} |
|
107
|
|
|
|
|
108
|
|
|
$this->acl($application, 'read'); |
|
|
|
|
|
|
109
|
|
|
|
|
110
|
|
|
$applicationIsUnread = false; |
|
111
|
|
|
if ($application->isUnreadBy($this->auth('id')) && $application->getStatus()) { |
|
|
|
|
|
|
112
|
|
|
$application->addReadBy($this->auth('id')); |
|
|
|
|
|
|
113
|
|
|
$applicationIsUnread = true; |
|
114
|
|
|
$application->changeStatus( |
|
115
|
|
|
$application->getStatus(), |
|
116
|
|
|
sprintf(/*@translate*/ 'Application was read by %s', |
|
117
|
|
|
$this->auth()->getUser()->getInfo()->getDisplayName())); |
|
118
|
|
|
} |
|
119
|
|
|
|
|
120
|
|
|
|
|
121
|
|
|
|
|
122
|
|
|
$format=$this->params()->fromQuery('format'); |
|
123
|
|
|
|
|
124
|
|
|
if ($application->isDraft()) { |
|
125
|
|
|
$list = false; |
|
126
|
|
|
} else { |
|
127
|
|
|
$list = $this->paginationParams('Applications\Index', $repository); |
|
|
|
|
|
|
128
|
|
|
$list->setCurrent($application->getId()); |
|
129
|
|
|
} |
|
130
|
|
|
|
|
131
|
|
|
$return = array( |
|
132
|
|
|
'application'=> $application, |
|
133
|
|
|
'list' => $list, |
|
134
|
|
|
'isUnread' => $applicationIsUnread, |
|
135
|
|
|
'format' => 'html' |
|
136
|
|
|
); |
|
137
|
|
|
switch ($format) { |
|
138
|
|
|
case 'json': |
|
139
|
|
|
/*@deprecated - must be refactored */ |
|
140
|
|
|
$viewModel = new JsonModel(); |
|
141
|
|
|
$viewModel->setVariables( |
|
142
|
|
|
/*array( |
|
|
|
|
|
|
143
|
|
|
'application' => */$this->serviceLocator |
|
144
|
|
|
->get('builders') |
|
145
|
|
|
->get('JsonApplication') |
|
146
|
|
|
->unbuild($application) |
|
147
|
|
|
); |
|
148
|
|
|
$viewModel->setVariable('isUnread', $applicationIsUnread); |
|
149
|
|
|
$return = $viewModel; |
|
150
|
|
|
break; |
|
151
|
|
|
case 'pdf': |
|
152
|
|
|
$pdf = $this->serviceLocator->get('Core/html2pdf'); |
|
|
|
|
|
|
153
|
|
|
$return['format'] = $format; |
|
154
|
|
|
break; |
|
155
|
|
|
default: |
|
156
|
|
|
$contentCollector = $this->getPluginManager()->get('Core/ContentCollector'); |
|
157
|
|
|
$contentCollector->setTemplate('applications/manage/details/action-buttons'); |
|
|
|
|
|
|
158
|
|
|
$actionButtons = $contentCollector->trigger('application.detail.actionbuttons', $application); |
|
|
|
|
|
|
159
|
|
|
|
|
160
|
|
|
$return = new ViewModel($return); |
|
161
|
|
|
$return->addChild($actionButtons, 'externActionButtons'); |
|
162
|
|
|
|
|
163
|
|
|
$allowSubsequentAttachmentUpload = $this->serviceLocator->get('Applications/Options') |
|
164
|
|
|
->getAllowSubsequentAttachmentUpload(); |
|
165
|
|
|
|
|
166
|
|
|
if ($allowSubsequentAttachmentUpload |
|
167
|
|
|
&& $this->acl($application, Application::PERMISSION_SUBSEQUENT_ATTACHMENT_UPLOAD, 'test') |
|
|
|
|
|
|
168
|
|
|
) { |
|
169
|
|
|
$attachmentsForm = $this->serviceLocator->get('forms') |
|
170
|
|
|
->get('Applications/Attachments'); |
|
171
|
|
|
$attachmentsForm->bind($application->getAttachments()); |
|
172
|
|
|
|
|
173
|
|
|
/* @var $request \Zend\Http\PhpEnvironment\Request */ |
|
174
|
|
|
$request = $this->getRequest(); |
|
175
|
|
|
|
|
176
|
|
|
if ($request->isPost() && $attachmentsForm->get('return')->getValue() === $request->getPost('return')) { |
|
177
|
|
|
$data = array_merge( |
|
178
|
|
|
$attachmentsForm->getOption('use_post_array') ? $request->getPost()->toArray() : [], |
|
179
|
|
|
$attachmentsForm->getOption('use_files_array') ? $request->getFiles()->toArray() : [] |
|
180
|
|
|
); |
|
181
|
|
|
$attachmentsForm->setData($data); |
|
182
|
|
|
|
|
183
|
|
|
if (!$attachmentsForm->isValid()) { |
|
184
|
|
|
return new JsonModel([ |
|
185
|
|
|
'valid' => false, |
|
186
|
|
|
'errors' => $attachmentsForm->getMessages() |
|
187
|
|
|
]); |
|
188
|
|
|
} |
|
189
|
|
|
|
|
190
|
|
|
$content = $attachmentsForm->getHydrator() |
|
191
|
|
|
->getLastUploadedFile() |
|
192
|
|
|
->getUri(); |
|
193
|
|
|
|
|
194
|
|
|
return new JsonModel([ |
|
195
|
|
|
'valid' => $attachmentsForm->isValid(), |
|
196
|
|
|
'content' => $content |
|
197
|
|
|
]); |
|
198
|
|
|
} |
|
199
|
|
|
|
|
200
|
|
|
$return->setVariable('attachmentsForm', $attachmentsForm); |
|
201
|
|
|
} |
|
202
|
|
|
|
|
203
|
|
|
break; |
|
204
|
|
|
} |
|
205
|
|
|
|
|
206
|
|
|
return $return; |
|
207
|
|
|
} |
|
208
|
|
|
|
|
209
|
|
|
/** |
|
210
|
|
|
* Refreshes the rating of an application |
|
211
|
|
|
* |
|
212
|
|
|
* @throws \DomainException |
|
213
|
|
|
* @return \Zend\View\Model\ViewModel |
|
214
|
|
|
*/ |
|
215
|
|
|
public function refreshRatingAction() |
|
216
|
|
|
{ |
|
217
|
|
|
$model = new ViewModel(); |
|
218
|
|
|
$model->setTemplate('applications/manage/_rating'); |
|
219
|
|
|
|
|
220
|
|
|
$application = $this->serviceLocator->get('repositories')->get('Applications/Application') |
|
221
|
|
|
->find($this->params('id', 0)); |
|
222
|
|
|
|
|
223
|
|
|
if (!$application) { |
|
224
|
|
|
throw new \DomainException('Invalid application id.'); |
|
225
|
|
|
} |
|
226
|
|
|
|
|
227
|
|
|
$model->setVariable('application', $application); |
|
228
|
|
|
return $model; |
|
229
|
|
|
} |
|
230
|
|
|
|
|
231
|
|
|
/** |
|
232
|
|
|
* Attaches a social profile to an application |
|
233
|
|
|
* @throws \InvalidArgumentException |
|
234
|
|
|
* |
|
235
|
|
|
* @return array |
|
236
|
|
|
*/ |
|
237
|
|
|
public function socialProfileAction() |
|
238
|
|
|
{ |
|
239
|
|
|
if ($spId = $this->params()->fromQuery('spId')) { |
|
|
|
|
|
|
240
|
|
|
$repositories = $this->serviceLocator->get('repositories'); |
|
241
|
|
|
$repo = $repositories->get('Applications/Application'); |
|
242
|
|
|
$profile = $repo->findProfile($this->params()->fromQuery('spId')); |
|
243
|
|
|
if (!$profile) { |
|
244
|
|
|
throw new \InvalidArgumentException('Could not find profile.'); |
|
245
|
|
|
} |
|
246
|
|
|
} elseif ($this->getRequest()->isPost() |
|
|
|
|
|
|
247
|
|
|
&& ($network = $this->params()->fromQuery('network')) |
|
248
|
|
|
&& ($data = $this->params()->fromPost('data')) |
|
249
|
|
|
) { |
|
250
|
|
|
$profileClass = '\\Auth\\Entity\\SocialProfiles\\' . $network; |
|
251
|
|
|
$profile = new $profileClass(); |
|
252
|
|
|
$profile->setData(\Zend\Json\Json::decode($data, \Zend\Json\Json::TYPE_ARRAY)); |
|
253
|
|
|
} else { |
|
254
|
|
|
throw new \RuntimeException( |
|
255
|
|
|
'Missing arguments. Either provide "spId" as Get or "network" and "data" as Post.' |
|
256
|
|
|
); |
|
257
|
|
|
} |
|
258
|
|
|
|
|
259
|
|
|
return array( |
|
260
|
|
|
'profile' => $profile |
|
261
|
|
|
); |
|
262
|
|
|
} |
|
263
|
|
|
|
|
264
|
|
|
/** |
|
265
|
|
|
* Changes the status of an application |
|
266
|
|
|
* |
|
267
|
|
|
* @return array |
|
|
|
|
|
|
268
|
|
|
*/ |
|
269
|
|
|
public function statusAction() |
|
270
|
|
|
{ |
|
271
|
|
|
$applicationId = $this->params('id'); |
|
272
|
|
|
/* @var \Applications\Repository\Application $repository */ |
|
273
|
|
|
$repository = $this->serviceLocator->get('repositories')->get('Applications/Application'); |
|
274
|
|
|
/* @var Application $application */ |
|
275
|
|
|
$application = $repository->find($applicationId); |
|
276
|
|
|
|
|
277
|
|
|
/* @var Request $request */ |
|
278
|
|
|
$request = $this->getRequest(); |
|
279
|
|
|
|
|
280
|
|
|
if (!$application) { |
|
281
|
|
|
throw new \InvalidArgumentException('Could not find application.'); |
|
282
|
|
|
} |
|
283
|
|
|
|
|
284
|
|
|
$this->acl($application, 'change'); |
|
|
|
|
|
|
285
|
|
|
|
|
286
|
|
|
$jsonFormat = 'json' == $this->params()->fromQuery('format'); |
|
287
|
|
|
$status = $this->params('status', Status::CONFIRMED); |
|
288
|
|
|
$settings = $this->settings(); |
|
|
|
|
|
|
289
|
|
|
|
|
290
|
|
|
if (in_array($status, array(Status::INCOMING))) { |
|
291
|
|
|
$application->changeStatus($status); |
|
292
|
|
|
if ($request->isXmlHttpRequest()) { |
|
293
|
|
|
$response = $this->getResponse(); |
|
294
|
|
|
$response->setContent('ok'); |
|
295
|
|
|
return $response; |
|
296
|
|
|
} |
|
297
|
|
|
if ($jsonFormat) { |
|
298
|
|
|
return array( |
|
299
|
|
|
'status' => 'success', |
|
300
|
|
|
); |
|
301
|
|
|
} |
|
302
|
|
|
return $this->redirect()->toRoute('lang/applications/detail', array(), true); |
|
|
|
|
|
|
303
|
|
|
} |
|
304
|
|
|
|
|
305
|
|
|
$events = $this->serviceLocator->get('Applications/Events'); |
|
306
|
|
|
|
|
307
|
|
|
/* @var ApplicationEvent $event */ |
|
308
|
|
|
$event = $events->getEvent(ApplicationEvent::EVENT_APPLICATION_STATUS_CHANGE, |
|
309
|
|
|
$this, |
|
310
|
|
|
[ |
|
311
|
|
|
'application' => $application, |
|
312
|
|
|
'status' => $status, |
|
313
|
|
|
'user' => $this->auth()->getUser(), |
|
314
|
|
|
] |
|
315
|
|
|
); |
|
316
|
|
|
|
|
317
|
|
|
$event->setIsPostRequest($request->isPost()); |
|
318
|
|
|
$event->setPostData($request->getPost()); |
|
319
|
|
|
$events->trigger($event); |
|
320
|
|
|
|
|
321
|
|
|
$params = $event->getFormData(); |
|
322
|
|
|
|
|
323
|
|
|
|
|
324
|
|
|
if ($request->isPost()) { |
|
325
|
|
|
|
|
326
|
|
|
if ($jsonFormat) { |
|
327
|
|
|
return array( |
|
328
|
|
|
'status' => 'success', |
|
329
|
|
|
); |
|
330
|
|
|
} |
|
331
|
|
|
$this->notification()->success($event->getNotification()); |
|
332
|
|
|
return $this->redirect()->toRoute('lang/applications/detail', array(), true); |
|
|
|
|
|
|
333
|
|
|
} |
|
334
|
|
|
|
|
335
|
|
|
if ($jsonFormat) { |
|
336
|
|
|
return $params; |
|
337
|
|
|
} |
|
338
|
|
|
|
|
339
|
|
|
/* @var \Applications\Form\Mail $form */ |
|
340
|
|
|
$form = $this->serviceLocator->get('FormElementManager')->get('Applications/Mail'); |
|
341
|
|
|
$form->populateValues($params); |
|
342
|
|
|
|
|
343
|
|
|
|
|
344
|
|
|
|
|
345
|
|
|
$reciptient = $params['to']; |
|
346
|
|
|
|
|
347
|
|
|
return [ |
|
348
|
|
|
'recipient' => $reciptient, |
|
349
|
|
|
'form' => $form |
|
350
|
|
|
]; |
|
351
|
|
|
} |
|
352
|
|
|
|
|
353
|
|
|
/** |
|
354
|
|
|
* Forwards an application via Email |
|
355
|
|
|
* |
|
356
|
|
|
* @throws \InvalidArgumentException |
|
357
|
|
|
* @return \Zend\View\Model\JsonModel |
|
358
|
|
|
*/ |
|
359
|
|
|
public function forwardAction() |
|
360
|
|
|
{ |
|
361
|
|
|
$services = $this->serviceLocator; |
|
362
|
|
|
$emailAddress = $this->params()->fromQuery('email'); |
|
363
|
|
|
/* @var \Applications\Entity\Application $application */ |
|
364
|
|
|
$application = $services->get('repositories')->get('Applications/Application') |
|
365
|
|
|
->find($this->params('id')); |
|
366
|
|
|
|
|
367
|
|
|
$this->acl($application, 'forward'); |
|
|
|
|
|
|
368
|
|
|
|
|
369
|
|
|
$translator = $services->get('translator'); |
|
370
|
|
|
|
|
371
|
|
|
if (!$emailAddress) { |
|
372
|
|
|
throw new \InvalidArgumentException('An email address must be supplied.'); |
|
373
|
|
|
} |
|
374
|
|
|
|
|
375
|
|
|
$params = array( |
|
376
|
|
|
'ok' => true, |
|
377
|
|
|
'text' => sprintf($translator->translate('Forwarded application to %s'), $emailAddress) |
|
378
|
|
|
); |
|
379
|
|
|
|
|
380
|
|
|
try { |
|
381
|
|
|
$userName = $this->auth('info')->getDisplayName(); |
|
|
|
|
|
|
382
|
|
|
$fromAddress = $application->getJob()->getContactEmail(); |
|
383
|
|
|
$mailOptions = array( |
|
384
|
|
|
'application' => $application, |
|
385
|
|
|
'to' => $emailAddress, |
|
386
|
|
|
'from' => array($fromAddress => $userName) |
|
387
|
|
|
); |
|
388
|
|
|
$this->mailer('Applications/Forward', $mailOptions, true); |
|
|
|
|
|
|
389
|
|
|
$this->notification()->success($params['text']); |
|
390
|
|
|
} catch (\Exception $ex) { |
|
391
|
|
|
$params = array( |
|
392
|
|
|
'ok' => false, |
|
393
|
|
|
'text' => sprintf($translator->translate('Forward application to %s failed.'), $emailAddress) |
|
394
|
|
|
); |
|
395
|
|
|
$this->notification()->error($params['text']); |
|
396
|
|
|
} |
|
397
|
|
|
$application->changeStatus($application->getStatus(), $params['text']); |
|
|
|
|
|
|
398
|
|
|
return new JsonModel($params); |
|
399
|
|
|
} |
|
400
|
|
|
|
|
401
|
|
|
/** |
|
402
|
|
|
* Deletes an application |
|
403
|
|
|
* |
|
404
|
|
|
* @return array|\Zend\Http\Response |
|
405
|
|
|
*/ |
|
406
|
|
|
public function deleteAction() |
|
407
|
|
|
{ |
|
408
|
|
|
$id = $this->params('id'); |
|
409
|
|
|
$services = $this->serviceLocator; |
|
410
|
|
|
$repositories= $services->get('repositories'); |
|
411
|
|
|
$repository = $repositories->get('Applications/Application'); |
|
412
|
|
|
$application = $repository->find($id); |
|
413
|
|
|
|
|
414
|
|
|
if (!$application) { |
|
415
|
|
|
throw new \DomainException('Application not found.'); |
|
416
|
|
|
} |
|
417
|
|
|
|
|
418
|
|
|
$this->acl($application, 'delete'); |
|
|
|
|
|
|
419
|
|
|
|
|
420
|
|
|
$events = $services->get('Applications/Events'); |
|
421
|
|
|
$events->trigger(ApplicationEvent::EVENT_APPLICATION_PRE_DELETE, $this, [ 'application' => $application ]); |
|
422
|
|
|
|
|
423
|
|
|
$repositories->remove($application); |
|
424
|
|
|
|
|
425
|
|
|
if ('json' == $this->params()->fromQuery('format')) { |
|
426
|
|
|
return ['status' => 'success']; |
|
427
|
|
|
} |
|
428
|
|
|
|
|
429
|
|
|
return $this->redirect()->toRoute('lang/applications', array(), true); |
|
|
|
|
|
|
430
|
|
|
} |
|
431
|
|
|
|
|
432
|
|
|
/** |
|
433
|
|
|
* Move an application to talent pool |
|
434
|
|
|
* |
|
435
|
|
|
* @return \Zend\Http\Response |
|
436
|
|
|
* @since 0.26 |
|
437
|
|
|
*/ |
|
438
|
|
|
public function moveAction() |
|
439
|
|
|
{ |
|
440
|
|
|
$id = $this->params('id'); |
|
441
|
|
|
$serviceManager = $this->serviceLocator; |
|
442
|
|
|
$repositories = $serviceManager->get('repositories'); |
|
443
|
|
|
$application = $repositories->get('Applications/Application')->find($id); |
|
444
|
|
|
|
|
445
|
|
|
if (!$application) { |
|
446
|
|
|
throw new \DomainException('Application not found.'); |
|
447
|
|
|
} |
|
448
|
|
|
|
|
449
|
|
|
$this->acl($application, 'move'); |
|
|
|
|
|
|
450
|
|
|
|
|
451
|
|
|
$user = $this->auth()->getUser(); |
|
452
|
|
|
$cv = $repositories->get('Cv/Cv')->createFromApplication($application, $user); |
|
453
|
|
|
|
|
454
|
|
|
$repositories->store($cv); |
|
455
|
|
|
$repositories->remove($application); |
|
456
|
|
|
|
|
457
|
|
|
$this->notification()->success( |
|
458
|
|
|
/*@translate*/ 'Application has been successfully moved to Talent Pool'); |
|
459
|
|
|
|
|
460
|
|
|
return $this->redirect()->toRoute('lang/applications', array(), true); |
|
|
|
|
|
|
461
|
|
|
} |
|
462
|
|
|
} |
|
463
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.