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

BaseEvent   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
ccs 0
cts 1
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getVersion() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the doyo/behat-coverage-extension project.
5
 *
6
 * (c) Anthonius Munthi <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Doyo\Behat\Coverage\Bridge\Symfony;
15
16 2
if (class_exists(' \Symfony\Contracts\EventDispatcher\Event')) {
17
    class BaseEvent extends \Symfony\Contracts\EventDispatcher\Event
18
    {
19
        public function getVersion()
20
        {
21
            return '4.3';
22
        }
23
    }
24
} else {
25
    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

25
    class BaseEvent extends /** @scrutinizer ignore-deprecated */ \Symfony\Component\EventDispatcher\Event
Loading history...
26
    {
27
        public function getVersion()
28
        {
29
            return '4.3';
30
        }
31
    }
32
}
33
34
class Event extends BaseEvent
35
{
36
}
37