PHPArg::setDefault()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
namespace Goetas\Xsd\XsdToPhp\Php\Structure;
3
4
class PHPArg
5
{
6
7
    protected $doc;
8
9
    protected $type;
10
11
    protected $name;
12
13
    protected $default;
14
15 30
    public function __construct($name = null)
16
    {
17 30
        $this->name = $name;
18 30
    }
19
20 8
    public function getDoc()
21
    {
22 8
        return $this->doc;
23
    }
24
25 19
    public function setDoc($doc)
26
    {
27 19
        $this->doc = $doc;
28 19
        return $this;
29
    }
30
31
    /**
32
     * @return PHPClass
33
     */
34 14
    public function getType()
35
    {
36 14
        return $this->type;
37
    }
38
39 30
    public function setType(PHPClass $type)
40
    {
41 30
        $this->type = $type;
42 30
        return $this;
43
    }
44
45 30
    public function getName()
46
    {
47 30
        return $this->name;
48
    }
49
50 19
    public function setName($name)
51
    {
52 19
        $this->name = $name;
53 19
        return $this;
54
    }
55
56
    public function getDefault()
57
    {
58
        return $this->default;
59
    }
60
61 8
    public function setDefault($default)
62
    {
63 8
        $this->default = $default;
64 8
        return $this;
65
    }
66
}
67