Code Duplication    Length = 53-53 lines in 2 locations

src/PhpGitHooks/Module/PhpMd/Contract/Command/PhpMdTool.php 1 location

@@ 7-59 (lines=53) @@
4
5
use Bruli\EventBusBundle\CommandBus\CommandInterface;
6
7
class PhpMdTool implements CommandInterface
8
{
9
    /**
10
     * @var array
11
     */
12
    private $files;
13
    /**
14
     * @var string
15
     */
16
    private $errorMessage;
17
    /**
18
     * @var string
19
     */
20
    private $options;
21
22
    /**
23
     * PhpMdToolCommand constructor.
24
     *
25
     * @param array  $files
26
     * @param string $options
27
     * @param string $errorMessage
28
     */
29
    public function __construct(array $files, $options, $errorMessage)
30
    {
31
        $this->files = $files;
32
        $this->errorMessage = $errorMessage;
33
        $this->options = $options;
34
    }
35
36
    /**
37
     * @return array
38
     */
39
    public function getFiles()
40
    {
41
        return $this->files;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getErrorMessage()
48
    {
49
        return $this->errorMessage;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getOptions()
56
    {
57
        return $this->options;
58
    }
59
}
60

src/PhpGitHooks/Module/PhpUnit/Contract/Command/PhpUnitTool.php 1 location

@@ 7-59 (lines=53) @@
4
5
use Bruli\EventBusBundle\CommandBus\CommandInterface;
6
7
class PhpUnitTool implements CommandInterface
8
{
9
    /**
10
     * @var bool
11
     */
12
    private $randomMode;
13
    /**
14
     * @var null|string
15
     */
16
    private $options;
17
    /**
18
     * @var string
19
     */
20
    private $errorMessage;
21
22
    /**
23
     * PhpUnitToolCommand constructor.
24
     *
25
     * @param bool        $randomMode
26
     * @param string|null $options
27
     * @param string      $errorMessage
28
     */
29
    public function __construct($randomMode, $options, $errorMessage)
30
    {
31
        $this->randomMode = $randomMode;
32
        $this->options = $options;
33
        $this->errorMessage = $errorMessage;
34
    }
35
36
    /**
37
     * @return bool
38
     */
39
    public function isRandomMode()
40
    {
41
        return $this->randomMode;
42
    }
43
44
    /**
45
     * @return null|string
46
     */
47
    public function getOptions()
48
    {
49
        return $this->options;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getErrorMessage()
56
    {
57
        return $this->errorMessage;
58
    }
59
}
60