MergeCommand::__toString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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 $revision)
22
 * @method boolean getPreview()
23
 * @method void setPreview(boolean $flag)
24
 * @method string getTool()
25
 * @method void setTool(string $tool)
26
 */
27
class MergeCommand extends AbstractCommand
28
{
29
    /**
30
     * Available arguments for this command.
31
     *
32
     * @var array $arguments
33
     */
34
    protected $arguments = [];
35
36
    /**
37
     * {@inheritdoc}
38
     *
39
     * @var mixed $options
40
     */
41
    protected $options = [
42
        '--rev'     => '',
43
        '--preview' => false,
44
        '--tool'    => ''
45
    ];
46
47
    /**
48
     * {@inheritdoc}
49
     */
50 1
    public function __toString()
51
    {
52 1
        return sprintf(
53 1
            "%s%s",
54 1
            $this->name,
55 1
            $this->assembleOptionString()
56
        );
57
    }
58
}
59