Passed
Pull Request — develop (#5)
by ANTHONIUS
03:52
created

BaseEvent::getVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 1
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace Doyo\Behat\Coverage\Bridge\Symfony;
5
6 2
if(class_exists(' \Symfony\Contracts\EventDispatcher\Event')){
7
    class BaseEvent extends \Symfony\Contracts\EventDispatcher\Event
8
    {
9
        public function getVersion()
10
        {
11
            return '4.3';
12
        }
13
    }
14
}else{
15
    class BaseEvent extends \Symfony\Component\EventDispatcher\Event
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

15
    class BaseEvent extends /** @scrutinizer ignore-deprecated */ \Symfony\Component\EventDispatcher\Event
Loading history...
16
    {
17
        public function getVersion()
18
        {
19
            return '4.3';
20
        }
21
    }
22
}
23
24
class Event extends BaseEvent
25
{
26
27
}
28