GetStagedFiles   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 11
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getGitCommand() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of SebastianFeldmann\Git.
5
 *
6
 * (c) Sebastian Feldmann <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace SebastianFeldmann\Git\Command\DiffIndex;
13
14
use SebastianFeldmann\Git\Command\Base;
15
16
/**
17
 * Class GetStagedFiles
18
 *
19
 * @package SebastianFeldmann\Git
20
 * @author  Sebastian Feldmann <[email protected]>
21
 * @link    https://github.com/sebastianfeldmann/git
22
 * @since   Class available since Release 0.9.0
23
 */
24
class GetStagedFiles extends Base
25
{
26
    /**
27
     * Return the command to execute.
28
     *
29
     * @return string
30 1
     * @throws \RuntimeException
31
     */
32 1
    protected function getGitCommand(): string
33
    {
34
        return 'diff-index --cached --name-status HEAD';
35
    }
36
}
37