Completed
Push — master ( 5cd7db...4c6168 )
by Sebastien
02:32
created

CerberePreActionEvent::getProjects()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Cerbere\Event;
4
5
use Cerbere\Action\ActionInterface;
6
use Cerbere\Cerbere;
7
use Cerbere\Model\Job;
8
use Cerbere\Model\Project;
9
10
/**
11
 * Class CerberePreActionEvent
12
 *
13
 * @package Cerbere\Event
14
 */
15 View Code Duplication
class CerberePreActionEvent extends CerbereEvent
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

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.

Loading history...
16
{
17
    /**
18
     * @var Cerbere
19
     */
20
    protected $cerbere;
21
22
    /**
23
     * @var Job
24
     */
25
    protected $job;
26
27
    /**
28
     * @var ActionInterface
29
     */
30
    protected $action;
31
32
    /**
33
     * @var Project[]
34
     */
35
    protected $projects;
36
37
    /**
38
     * @param Cerbere $cerbere
39
     * @param Job $job
40
     * @param ActionInterface $action
41
     * @param Project[] $projects
42
     */
43
    public function __construct(Cerbere $cerbere, Job $job, ActionInterface $action, $projects = array())
44
    {
45
        $this->cerbere = $cerbere;
46
        $this->job = $job;
47
        $this->action = $action;
48
        $this->projects = $projects;
49
    }
50
51
    /**
52
     * @return ActionInterface
53
     */
54
    public function getAction()
55
    {
56
        return $this->action;
57
    }
58
59
    /**
60
     * @param ActionInterface $action
61
     */
62
    public function setAction($action)
63
    {
64
        $this->action = $action;
65
    }
66
67
    /**
68
     * @return Cerbere
69
     */
70
    public function getCerbere()
71
    {
72
        return $this->cerbere;
73
    }
74
75
    /**
76
     * @return Job
77
     */
78
    public function getJob()
79
    {
80
        return $this->job;
81
    }
82
83
    /**
84
     * @param Job $job
85
     */
86
    public function setJob($job)
87
    {
88
        $this->job = $job;
89
    }
90
91
    /**
92
     * @return \Cerbere\Model\Project[]
93
     */
94
    public function getProjects()
95
    {
96
        return $this->projects;
97
    }
98
99
    /**
100
     * @param \Cerbere\Model\Project[] $projects
101
     */
102
    public function setProjects($projects)
103
    {
104
        $this->projects = $projects;
105
    }
106
}
107