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

InterfaceModel   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 24
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFunctions() 0 3 1
A addFunction() 0 3 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