InputDefinition   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 48
rs 10
c 0
b 0
f 0
wmc 5
lcom 2
cbo 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A addOption() 0 4 1
A addArgument() 0 4 1
A getOptions() 0 4 1
A getArguments() 0 4 1
1
<?php
2
/*
3
 * Copyright (c) 2015 Juan José Torroglosa Ramón
4
 *
5
 * This file is part of the Cliphar package.
6
 *
7
 * For the full copyright and license information, please view
8
 * the LICENSE file that was distributed with this source code.
9
 */
10
11
namespace Cliphar\InputDefinition\Model;
12
13
class InputDefinition
14
{
15
    /**
16
     * @var Option[]
17
     */
18
    private $options;
19
20
    /**
21
     * @var Argument[]
22
     */
23
    private $arguments;
24
25
    /**
26
     * InputDefinition constructor.
27
     */
28
    public function __construct()
29
    {
30
        $this->options = array();
31
        $this->arguments = array();
32
    }
33
34
35
    public function addOption(Option $option)
36
    {
37
        $this->options[] = $option;
38
    }
39
40
    public function addArgument(Argument $argument)
41
    {
42
        $this->arguments[] = $argument;
43
    }
44
45
    /**
46
     * @return Option[]
47
     */
48
    public function getOptions()
49
    {
50
        return $this->options;
51
    }
52
53
    /**
54
     * @return Argument[]
55
     */
56
    public function getArguments()
57
    {
58
        return $this->arguments;
59
    }
60
}