AbstractGitEvent   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 39
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getWrapper() 0 4 1
A getProcess() 0 4 1
A getCommand() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GitWrapper\Event;
6
7
use GitWrapper\GitCommand;
8
use GitWrapper\GitWrapper;
9
use Symfony\Component\Process\Process;
10
use Symfony\Contracts\EventDispatcher\Event;
11
12
/**
13
 * Event instance passed as a result of git.* commands.
14
 */
15
abstract class AbstractGitEvent extends Event
16
{
17
    /**
18
     * @var GitWrapper
19
     */
20
    protected $gitWrapper;
21
22
    /**
23
     * @var Process
24
     */
25
    protected $process;
26
27
    /**
28
     * @var GitCommand
29
     */
30
    protected $gitCommand;
31
32
    public function __construct(GitWrapper $gitWrapper, Process $process, GitCommand $gitCommand)
33
    {
34
        $this->gitWrapper = $gitWrapper;
35
        $this->process = $process;
36
        $this->gitCommand = $gitCommand;
37
    }
38
39
    public function getWrapper(): GitWrapper
40
    {
41
        return $this->gitWrapper;
42
    }
43
44
    public function getProcess(): Process
45
    {
46
        return $this->process;
47
    }
48
49
    public function getCommand(): GitCommand
50
    {
51
        return $this->gitCommand;
52
    }
53
}
54