Completed
Push — develop ( 1b34c6...481302 )
by Paul
02:47
created

InterfaceModel::addFunction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
namespace PhpUnitGen\Model;
4
5
use PhpUnitGen\Model\ModelInterface\FunctionModelInterface;
6
use PhpUnitGen\Model\ModelInterface\InterfaceModelInterface;
7
use PhpUnitGen\Model\PropertyTrait\NamespaceTrait;
8
use PhpUnitGen\Model\PropertyTrait\NameTrait;
9
use PhpUnitGen\Model\PropertyTrait\NodeTrait;
10
11
/**
12
 * Class InterfaceModel.
13
 *
14
 * @author     Paul Thébaud <[email protected]>.
15
 * @copyright  2017-2018 Paul Thébaud <[email protected]>.
16
 * @license    https://opensource.org/licenses/MIT The MIT license.
17
 * @link       https://github.com/paul-thebaud/phpunit-generator
18
 * @since      Class available since Release 2.0.0.
19
 */
20
class InterfaceModel implements InterfaceModelInterface
21
{
22
    use NameTrait;
23
    use NodeTrait;
24
25
    /**
26
     * @var FunctionModelInterface[] $functions Class functions.
27
     */
28
    private $functions = [];
29
30
    /**
31
     * {@inheritdoc}
32
     */
33
    public function addFunction(FunctionModelInterface $function): void
34
    {
35
        $this->functions[] = $function;
36
    }
37
38
    /**
39
     * {@inheritdoc}
40
     */
41
    public function getFunctions(): array
42
    {
43
        return $this->functions;
44
    }
45
}
46