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

Director   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 1
dl 0
loc 54
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Slince\Di\Tests\TestClass;
3
4
class Director
5
{
6
    protected $name;
7
8
    protected $age;
9
10
    public function __construct($name = '', $age = 18)
11
    {
12
        $this->name = $name;
13
        $this->age = $age;
14
    }
15
16
    /**
17
     * @return mixed
18
     */
19
    public function getName()
20
    {
21
        return $this->name;
22
    }
23
24
    /**
25
     * @param mixed $name
26
     */
27
    public function setName($name)
28
    {
29
        $this->name = $name;
30
    }
31
32
    /**
33
     * @return mixed
34
     */
35
    public function getAge()
36
    {
37
        return $this->age;
38
    }
39
40
    /**
41
     * @param mixed $age
42
     */
43
    public function setAge($age)
44
    {
45
        $this->age = $age;
46
    }
47
48
    public function direct($movieName)
49
    {
50
        return new Movie($this, $movieName, date('Y-m-d'));
51
    }
52
53
    public static function factory()
54
    {
55
        return new Director();
56
    }
57
}
58