PatchManagerEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 42.86%

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 36
ccs 3
cts 7
cp 0.4286
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getSubject() 0 3 1
A getMatchedPatchOperation() 0 3 1
1
<?php
2
3
namespace Cypress\PatchManager\Event;
4
5
use Cypress\PatchManager\MatchedPatchOperation;
6
use Cypress\PatchManager\Patchable;
7
use Symfony\Contracts\EventDispatcher\Event;
8
9
class PatchManagerEvent extends Event
10
{
11
    /**
12
     * @var MatchedPatchOperation
13
     */
14
    private MatchedPatchOperation $matchedPatchOperation;
1 ignored issue
show
Coding Style introduced by
Private member variable "matchedPatchOperation" must contain a leading underscore
Loading history...
15
16
    /**
17
     * @var Patchable
18
     */
19
    private Patchable $subject;
1 ignored issue
show
Coding Style introduced by
Private member variable "subject" must contain a leading underscore
Loading history...
20
21
    /**
22
     * @param MatchedPatchOperation $matchedPatchOperation
23
     * @param Patchable $subject
24
     */
25 2
    public function __construct(MatchedPatchOperation $matchedPatchOperation, Patchable $subject)
26
    {
27 2
        $this->matchedPatchOperation = $matchedPatchOperation;
28 2
        $this->subject = $subject;
29
    }
30
31
    /**
32
     * @return MatchedPatchOperation
33
     */
34
    public function getMatchedPatchOperation(): MatchedPatchOperation
35
    {
36
        return $this->matchedPatchOperation;
37
    }
38
39
    /**
40
     * @return Patchable
41
     */
42
    public function getSubject(): Patchable
43
    {
44
        return $this->subject;
45
    }
46
}
47