Commits::getGitCommand()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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\Log;
13
14
/**
15
 * Class Commits
16
 *
17
 * @package SebastianFeldmann\Git
18
 * @author  Sebastian Feldmann <[email protected]>
19
 * @link    https://github.com/sebastianfeldmann/git
20
 * @since   Class available since Release 0.9.0
21
 */
22
class Commits extends Log
23
{
24
    /**
25
     * Return the command to execute.
26
     *
27
     * @return string
28 9
     * @throws \RuntimeException
29
     */
30 9
    protected function getGitCommand(): string
31 9
    {
32 9
        return 'log --pretty=format:' .  escapeshellarg($this->format)
33 9
               . $this->abbrev
34 9
               . $this->author
35
               . $this->merges
36
               . $this->since;
37
    }
38
}
39