Code Duplication    Length = 6-6 lines in 3 locations

module/Applications/src/Applications/Controller/IndexController.php 2 locations

@@ 189-194 (lines=6) @@
186
                     * This is temporary until Companies are implemented.
187
                     */
188
                    $recruiter = $services->get('repositories')->get('Auth/User')->findOneByEmail($job->contactEmail);
189
                    if (!$recruiter) {
190
                        $recruiter = $job->user;
191
                        $admin     = false;
192
                    } else {
193
                        $admin     = $job->user;
194
                    }
195
                
196
                    $services->get('repositories')->store($applicationEntity);
197
                    /*
@@ 202-207 (lines=6) @@
199
                     * This is temporary until Companies are implemented.
200
                     */
201
                    $recruiter = $services->get('repositories')->get('Auth/User')->findOneByEmail($job->contactEmail);
202
                    if (!$recruiter) {
203
                        $recruiter = $job->user;
204
                        $admin     = false;
205
                    } else {
206
                        $admin     = $job->user;
207
                    }
208
                
209
                    if ($recruiter->getSettings('Applications')->getMailAccess()) {
210
                        $this->mailer('Applications/NewApplication', array('job' => $job, 'user' => $recruiter, 'admin' => $admin), /*send*/ true);

module/Applications/src/Applications/Controller/ApplyController.php 1 location

@@ 341-346 (lines=6) @@
338
                          ->get('repositories')
339
                          ->get('Auth/User')->findOneByEmail($job->contactEmail);
340
        
341
        if (!$recruiter) {
342
            $recruiter = $job->user;
343
            $admin     = false;
344
        } else {
345
            $admin     = $job->user;
346
        }
347
        
348
        $settings = $recruiter->getSettings('Applications');
349
        if ($settings->getMailAccess()) {