Passed
Push — master ( 2aad05...4fe473 )
by Yo
02:45
created

Script   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 80%

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 1
cbo 0
dl 0
loc 41
ccs 8
cts 10
cp 0.8
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getName() 0 4 1
A getCommand() 0 4 1
A getItemId() 0 4 1
1
<?php
2
namespace Yoanm\ComposerConfigManager\Domain\Model;
3
4
class Script implements ConfigurationItemInterface
5
{
6
    /** @var string */
7
    private $name;
8
    /** @var string */
9
    private $command;
10
11
    /**
12
     * @param string $name
13
     * @param string $command
14
     */
15 3
    public function __construct($name, $command)
16
    {
17 3
        $this->name = $name;
18 3
        $this->command = $command;
19 3
    }
20
21
    /**
22
     * @return string
23
     */
24 3
    public function getName()
25
    {
26 3
        return $this->name;
27
    }
28
29
    /**
30
     * @return string
31
     */
32 3
    public function getCommand()
33
    {
34 3
        return $this->command;
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    public function getItemId()
41
    {
42
        return $this->getName();
43
    }
44
}
45