Command::setDefinition()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the AMFConsoleBundle.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace AMF\ConsoleBundle\Form\Model;
11
12
/**
13
 * Model class for command
14
 *
15
 * @author Amine Fattouch <[email protected]>
16
 */
17
class Command
18
{
19
    /**
20
     * @var string
21
     */
22
    private $definition;
23
24
    /**
25
     * @var array
26
     */
27
    private $arguments = [];
28
29
    /**
30
     * Getter for field definition.
31
     *
32
     * @return string
33
     */
34
    public function getDefinition()
35
    {
36
        return $this->definition;
37
    }
38
39
    /**
40
     * Setter for field definition.
41
     *
42
     * @param string $definition
43
     *
44
     * @return self
45
     */
46
    public function setDefinition($definition)
47
    {
48
        $this->definition = $definition;
49
50
        return $this;
51
    }
52
53
    /**
54
     * Getter for association arguments.
55
     *
56
     * @return ArrayCollection
57
     */
58
    public function getArguments()
59
    {
60
        return $this->arguments;
61
    }
62
63
    /**
64
     * Setter for association arguments.
65
     *
66
     * @param array $arguments
67
     *
68
     * @return self
69
     */
70
    public function setArguments(array $arguments = [])
71
    {
72
        $this->arguments = $arguments;
73
74
        return $this;
75
    }
76
77
    /**
78
     * Adds an argument if it doesn't exist to the association with arguments.
79
     *
80
     * @param Argument $argument
81
     *
82
     * @return self
83
     */
84
    public function addArgument(Argument $argument = null)
85
    {
86
        $this->arguments[] = $argument;
87
88
        return $this;
89
    }
90
}
91