Passed
Push — master ( 97922a...771d86 )
by Mattia
24:19 queued 20:44
created

PatchManagerEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
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