BisecCommand::__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 boolean getReset()
21
 * @method void setReset(boolean $flag)
22
 * @method boolean getGood()
23
 * @method void setGood(boolean $flag)
24
 * @method boolean getBad()
25
 * @method void setBad(boolean $flag)
26
 * @method boolean getSkip()
27
 * @method void setSkip(boolean $flag)
28
 * @method boolean getExtend()
29
 * @method void setExtend(boolean $flag)
30
 * @method string getCommand()
31
 * @method void setCommand(string $command)
32
 * @method boolean getNoupdate()
33
 * @method void setNoupdate(boolean $flag)
34
 */
35
class BisecCommand extends AbstractCommand
36
{
37
    /**
38
     * Available arguments for this command.
39
     *
40
     * @var array $arguments
41
     */
42
    protected $arguments = [];
43
44
    /**
45
     * {@inheritdoc}
46
     *
47
     * @var mixed $options
48
     */
49
    protected $options = [
50
        '--reset'    => false,
51
        '--good'     => false,
52
        '--bad'      => false,
53
        '--skip'     => false,
54
        '--extend'   => false,
55
        '--command'  => '',
56
        '--noupdate' => false
57
    ];
58
59
    /**
60
     * {@inheritdoc}
61
     */
62 1
    public function __toString()
63
    {
64 1
        return sprintf(
65 1
            "%s%s",
66 1
            $this->name,
67 1
            $this->assembleOptionString()
68
        );
69
    }
70
}
71