Completed
Push — master ( 3728bb...c02760 )
by Taosikai
12:33
created

Movie::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
namespace Slince\Di\Tests\TestClass;
3
4
class Movie
5
{
6
    protected $name;
7
8
    protected $time;
9
10
    /**
11
     * 导演
12
     * @var Director
13
     */
14
    protected $director;
15
16
    /**
17
     * 男演员
18
     * @var ActorInterface
19
     */
20
    protected $actor;
21
22
23
    /**
24
     * 女演员
25
     * @var ActorInterface
26
     */
27
    protected $actress;
28
29
    public function __construct(Director $director, ActorInterface $actor)
30
    {
31
        $this->director = $director;
32
        $this->actor = $actor;
33
    }
34
35
    /**
36
     * @param mixed $name
37
     */
38
    public function setName($name)
39
    {
40
        $this->name = $name;
41
    }
42
43
    /**
44
     * @return mixed
45
     */
46
    public function getName()
47
    {
48
        return $this->name;
49
    }
50
51
    /**
52
     * @param mixed $time
53
     */
54
    public function setTime($time)
55
    {
56
        $this->time = $time;
57
    }
58
59
    /**
60
     * @return mixed
61
     */
62
    public function getTime()
63
    {
64
        return $this->time;
65
    }
66
67
    /**
68
     * @return Director
69
     */
70
    public function getDirector()
71
    {
72
        return $this->director;
73
    }
74
75
    /**
76
     * 设置女演员
77
     * @param ActorInterface $actress
78
     */
79
    public function setActress(ActorInterface $actress)
80
    {
81
        $this->actress = $actress;
82
    }
83
84
    /**
85
     * @return ActorInterface
86
     */
87
    public function getActor()
88
    {
89
        return $this->actor;
90
    }
91
92
    /**
93
     * @return ActorInterface
94
     */
95
    public function getActress()
96
    {
97
        return $this->actress;
98
    }
99
}
100