Passed
Push — bump-dependencies ( b4f034...4ebfc0 )
by Mattia
12:55 queued 09:49
created

PatchManagerEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 42.86%

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 20
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
declare(strict_types=1);
4
5
namespace Cypress\PatchManager\Event;
6
7
use Cypress\PatchManager\MatchedPatchOperation;
8
use Cypress\PatchManager\Patchable;
9
use Symfony\Contracts\EventDispatcher\Event;
10
11
class PatchManagerEvent extends Event
12
{
13
    private MatchedPatchOperation $matchedPatchOperation;
14
15
    private Patchable $subject;
0 ignored issues
show
Coding Style introduced by
Private member variable "subject" must contain a leading underscore
Loading history...
16
17 2
    public function __construct(MatchedPatchOperation $matchedPatchOperation, Patchable $subject)
18
    {
19 2
        $this->matchedPatchOperation = $matchedPatchOperation;
20 2
        $this->subject = $subject;
21
    }
22
23
    public function getMatchedPatchOperation(): MatchedPatchOperation
24
    {
25
        return $this->matchedPatchOperation;
26
    }
27
28
    public function getSubject(): Patchable
29
    {
30
        return $this->subject;
31
    }
32
}
33