PathsCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 49
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A setName() 0 4 1
A __toString() 0 9 1
1
<?php
2
/**
3
 * VersionControl_HG
4
 * Simple OO implementation for Mercurial.
5
 *
6
 * PHP Version 5.4
7
 *
8
 * @copyright 2014 Siad Ardroumli
9
 * @license http://www.opensource.org/licenses/mit-license.php MIT
10
 * @link http://siad007.github.io/versioncontrol_hg
11
 */
12
13
namespace Siad007\VersionControl\HG\Command;
14
15
use Siad007\VersionControl\HG\Command;
16
17
/**
18
 * Simple OO implementation for Mercurial.
19
 *
20
 * @author Siad Ardroumli <[email protected]>
21
 */
22
class PathsCommand extends AbstractCommand
23
{
24
    /**
25
     * Available arguments for this command.
26
     *
27
     * @var array $arguments
28
     */
29
    protected $arguments = [
30
        'name' => ''
31
    ];
32
33
    /**
34
     * {@inheritdoc}
35
     *
36
     * @var mixed $options
37
     */
38
    protected $options = [];
39
40
    /**
41
     * @return string
42
     */
43 1
    public function getName()
44
    {
45 1
        return $this->arguments['name'];
46
    }
47
48
    /**
49
     * @param string $name
50
     *
51
     * @return void
52
     */
53 1
    public function setName($name)
54
    {
55 1
        $this->arguments['name'] = $name;
56 1
    }
57
58
    /**
59
     * {@inheritdoc}
60
     */
61 1
    public function __toString()
62
    {
63 1
        return sprintf(
64 1
            "%s%s%s",
65 1
            $this->name,
66 1
            $this->assembleOptionString(),
67 1
            $this->arguments['name']
68
        );
69
    }
70
}
71