Completed
Push — develop ( e649e8...88dc2a )
by
unknown
08:28
created

AcceptApplication::setApplication()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 9
rs 9.6666
cc 1
eloc 7
nc 1
nop 2
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