Passed
Push — parser-refactoring ( e758c6 )
by Luis
04:05
created

Definition::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * PHP version 7.1
4
 *
5
 * This source file is subject to the license that is bundled with this package in the file LICENSE.
6
 */
7
namespace PhUml\Code;
8
9
use PhUml\Graphviz\HasNodeIdentifier;
10
use PhUml\Graphviz\ObjectHashIdentifier;
11
12
class Definition implements HasNodeIdentifier
13
{
14
    use ObjectHashIdentifier;
15
16
    /** @var string */
17
    public $name;
18
19
    /** @var Method[] */
20
    public $functions;
21
22
    /** @var Definition */
23
    public $extends;
24
25
    /**
26
     * @param Method[] $methods
27
     */
28 171
    public function __construct(string $name, array $methods = [], Definition $extends = null)
29
    {
30 171
        $this->name = $name;
31 171
        $this->functions = $methods;
32 171
        $this->extends = $extends;
33 171
    }
34
}
35