Completed
Push — master ( 8ee32e...efc44e )
by Pablo
02:33
created

ComposerTool::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 5
Ratio 100 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 5
loc 5
rs 9.4285
ccs 4
cts 4
cp 1
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
3
namespace PhpGitHooks\Module\Composer\Contract\Command;
4
5
use Bruli\EventBusBundle\CommandBus\CommandInterface;
6
7 View Code Duplication
class ComposerTool implements CommandInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
8
{
9
    /**
10
     * @var array
11
     */
12
    private $files;
13
    /**
14
     * @var string
15
     */
16
    private $errorMessage;
17
18
    /**
19
     * ComposerToolCommand constructor.
20
     *
21
     * @param array  $files
22
     * @param string $errorMessage
23
     */
24 4
    public function __construct(array $files, $errorMessage)
25
    {
26 4
        $this->files = $files;
27 4
        $this->errorMessage = $errorMessage;
28 4
    }
29
30
    /**
31
     * @return string
32
     */
33 3
    public function getErrorMessage()
34
    {
35 3
        return $this->errorMessage;
36
    }
37
38
    /**
39
     * @return array
40
     */
41 3
    public function getFiles()
42
    {
43 3
        return $this->files;
44
    }
45
}
46