Get   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getGitCommand() 0 3 1
A name() 0 5 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\Config;
13
14
use SebastianFeldmann\Git\Command\Base;
15
16
/**
17
 * Class Get
18
 *
19
 * @package SebastianFeldmann\Git
20
 * @author  Sebastian Feldmann <[email protected]>
21
 * @link    https://github.com/sebastianfeldmann/git
22
 * @since   Class available since Release 1.0.2
23
 */
24
class Get extends Base
25
{
26
    /**
27
     * The name of the configuration key to get
28
     *
29
     * @var string
30
     */
31
    private $name;
32
33
    /**
34
     * The name of the configuration key to get.
35
     *
36
     * @param string $name
37 6
     * @return \SebastianFeldmann\Git\Command\Config\Get
38
     */
39 6
    public function name(string $name): Get
40
    {
41 6
        $this->name = $name;
42
43
        return $this;
44
    }
45
46
    /**
47
     * Return the command to execute.
48
     *
49 1
     * @return string
50
     */
51 1
    protected function getGitCommand(): string
52
    {
53
        return 'config --get ' .  escapeshellarg($this->name);
54
    }
55
}
56