Passed
Push — develop ( 45600c...ff69f6 )
by Paul
03:16
created

InterfaceModel::getFunctions()   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 0
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