PhaseCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 34
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 34
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 boolean getPublic()
21
 * @method void setPublic(boolean $flag)
22
 * @method string getDraft()
23
 * @method void setDraft(boolean $flag)
24
 * @method boolean getSecret()
25
 * @method void setSecret(boolean $flag)
26
 * @method boolean getForce()
27
 * @method void setForce(boolean $flag)
28
 * @method array getRev()
29
 * @method void addRev(string $revision)
30
 */
31
class PhaseCommand extends AbstractCommand
32
{
33
    /**
34
     * {@inheritdoc}
35
     *
36
     * @var mixed $options
37
     */
38
    protected $options = [
39
        '--public' => false,
40
        '--draft'  => false,
41
        '--secret' => false,
42
        '--force'  => false,
43
        '--rev'    => []
44
    ];
45
46
    /**
47
     * Available arguments for this command.
48
     *
49
     * @var array $arguments
50
     */
51
    protected $arguments = [];
52
53
    /**
54
     * {@inheritdoc}
55
     */
56 1
    public function __toString()
57
    {
58 1
        return sprintf(
59 1
            "%s%s",
60 1
            $this->name,
61 1
            $this->assembleOptionString()
62
        );
63
    }
64
}
65