Completed
Push — develop ( e649e8...88dc2a )
by
unknown
15:53 queued 08:30
created

AcceptApplication   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 5

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 1
cbo 5
dl 0
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A setApplication() 0 9 1
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
/** NewApplication.php */
11
namespace Applications\Mail;
12
13
use Core\Mail\StringTemplateMessage;
14
use Applications\Entity\ApplicationInterface;
15
16
class AcceptApplication extends StatusChange implements StatusChangeInterface
17
{
18
19
    /**
20
     * Sets the application
21
     *
22
     * @param ApplicationInterface $application
23
     * @param string|null $status
24
     * @return $this
25
     */
26
    public function setApplication(ApplicationInterface $application, $status = null)
27
    {
28
        $this->application = $application;
29
        $this->setTo(
30
            $application->getJob()->getUser()->getInfo()->getEmail(),
31
            $application->getJob()->getUser()->getInfo()->getDisplayName(false));
32
        $this->setVariablesFromApplication($application);
33
        return $this;
34
    }
35
}
36