Passed
Push — master ( 6e3bd3...d52744 )
by Sebastian
02:51
created

GetBranch::getGitCommand()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * This file is part of SebastianFeldmann\Git.
4
 *
5
 * (c) Sebastian Feldmann <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace SebastianFeldmann\Git\Command\RevParse;
11
12
use SebastianFeldmann\Git\Command\Base;
13
14
/**
15
 * Class GetBranch
16
 *
17
 * @package SebastianFeldmann\Git
18
 * @author  Sebastian Feldmann <[email protected]>
19
 * @link    https://github.com/sebastianfeldmann/git
20
 * @since   Class available since Release 2.3.1
21
 */
22
class GetBranch extends Base
23
{
24
    /**
25
     * Return the command to execute.
26
     *
27
     * @return string
28
     */
29 1
    protected function getGitCommand(): string
30
    {
31 1
        return 'rev-parse --abbrev-ref HEAD';
32
    }
33
}
34