HeadsCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 33
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 8 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
/**
16
 * Simple OO implementation for Mercurial.
17
 *
18
 * @author Siad Ardroumli <[email protected]>
19
 *
20
 * @method string getRev()
21
 * @method void setRev(string $startrev)
22
 * @method boolean getTopo()
23
 * @method void setTopo(boolean $flag)
24
 * @method boolean getClosed()
25
 * @method void setClosed(boolean $flag)
26
 * @method string getTemplate()
27
 * @method void setTemplate(string $template)
28
 */
29
class HeadsCommand extends AbstractCommand
30
{
31
    /**
32
     * Available arguments for this command.
33
     *
34
     * @var array $arguments
35
     */
36
    protected $arguments = [];
37
38
    /**
39
     * {@inheritdoc}
40
     *
41
     * @var mixed $options
42
     */
43
    protected $options = [
44
        '--rev'      => '',
45
        '--topo'     => false,
46
        '--closed'   => false,
47
        '--template' => ''
48
    ];
49
50
    /**
51
     * {@inheritdoc}
52
     */
53 1
    public function __toString()
54
    {
55 1
        return sprintf(
56 1
            "%s%s",
57 1
            $this->name,
58 1
            $this->assembleOptionString()
59
        );
60
    }
61
}
62