Completed
Pull Request — master (#97)
by
unknown
01:39
created

AbstractEvent

Complexity

Total Complexity 0

Size/Duplication

Total Lines 3
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 0
lcom 0
cbo 0
dl 0
loc 3
ccs 0
cts 0
cp 0
c 0
b 0
f 0
1
<?php
2
3
namespace Noxlogic\RateLimitBundle\Events;
4
5
use Symfony\Component\EventDispatcher\Event as LegacyEvent;
6
use Symfony\Contracts\EventDispatcher\Event;
7
8 1
if (!class_exists('Symfony\\Contracts\\EventDispatcher\\Event')) {
9
    /**
10
     * Symfony 3.4
11
     */
12
    abstract class AbstractEvent extends LegacyEvent
13
    {
14
    }
15
} else {
16
    /**
17
     * Symfony >= 4.3
18
     */
19
    abstract class AbstractEvent extends Event
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type Noxlogic\RateLimitBundle\Events\AbstractEvent has been defined more than once; this definition is ignored, only the first definition in this file (L12-14) is considered.

This check looks for classes that have been defined more than once in the same file.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
20
    {
21
    }
22
}
23