Passed
Push — develop ( 45600c...ff69f6 )
by Paul
03:16
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 addFunction() 0 3 1
A getFunctions() 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
10
/**
11
 * Class InterfaceModel.
12
 *
13
 * @author     Paul Thébaud <[email protected]>.
14
 * @copyright  2017-2018 Paul Thébaud <[email protected]>.
15
 * @license    https://opensource.org/licenses/MIT The MIT license.
16
 * @link       https://github.com/paul-thebaud/phpunit-generator
17
 * @since      Class available since Release 2.0.0.
18
 */
19
class InterfaceModel implements InterfaceModelInterface
20
{
21
    use NamespaceTrait;
22
    use NameTrait;
23
24
    /**
25
     * @var FunctionModel[] $functions Class functions.
26
     */
27
    private $functions = [];
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function addFunction(FunctionModelInterface $function): void
33
    {
34
        $this->functions[] = $function;
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    public function getFunctions(): array
41
    {
42
        return $this->functions;
43
    }
44
}
45