Completed
Push — master ( 9a44f8...a84e89 )
by Igor
01:47
created

Argument::isVariadic()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Leaditin\Code;
4
5
/**
6
 * @package Leaditin\Code
7
 * @author Igor Vuckovic <[email protected]>
8
 * @license MIT
9
 */
10
class Argument
11
{
12
    /**
13
     * @var string
14
     */
15
    protected $name;
16
17
    /**
18
     * @var Type
19
     */
20
    protected $type;
21
22
    /**
23
     * @var Value
24
     */
25
    protected $defaultValue;
26
27
    /**
28
     * @var bool
29
     */
30
    protected $isReference;
31
32
    /**
33
     * @var bool
34
     */
35
    protected $isVariadic;
36
37
    /**
38
     * @param string $name
39
     * @param Type $type
40
     * @param Value $defaultValue
41
     * @param bool $isReference
42
     * @param bool $isVariadic
43
     */
44 1
    public function __construct(string $name, Type $type, Value $defaultValue, bool $isReference = false, bool $isVariadic = false)
45
    {
46 1
        $this->name = $name;
47 1
        $this->type = $type;
48 1
        $this->defaultValue = $defaultValue;
49 1
        $this->isReference = $isReference;
50 1
        $this->isVariadic = $isVariadic;
51 1
    }
52
53
    /**
54
     * @return string
55
     */
56 1
    public function name(): string
57
    {
58 1
        return $this->name;
59
    }
60
61
    /**
62
     * @return Type
63
     */
64 1
    public function type(): Type
65
    {
66 1
        return $this->type;
67
    }
68
69
    /**
70
     * @return Value
71
     */
72 1
    public function defaultValue(): Value
73
    {
74 1
        return $this->defaultValue;
75
    }
76
77
    /**
78
     * @return bool
79
     */
80 1
    public function isReference(): bool
81
    {
82 1
        return $this->isReference;
83
    }
84
85
    /**
86
     * @return bool
87
     */
88 1
    public function isVariadic(): bool
89
    {
90 1
        return $this->isVariadic;
91
    }
92
}
93