AbstractEvent
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 3
Duplicated Lines 0 %

Coupling/Cohesion

Dependencies 0

Importance

Changes 0
Metric Value
wmc 0
cbo 0
dl 0
loc 3
c 0
b 0
f 0
1
<?php
2
namespace Goetas\Twital\EventDispatcher;
3
4
use Symfony\Component\EventDispatcher\Event as ComponentEvent;
5
use Symfony\Contracts\EventDispatcher\Event as ContractsEvent;
6
7
if (class_exists(ContractsEvent::class)) {
8
    /**
9
     * @internal
10
     */
11
    abstract class AbstractEvent extends ContractsEvent
12
    {
13
    }
14
} else {
15
    /**
16
     * @internal
17
     */
18
    abstract class AbstractEvent extends ComponentEvent
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type Goetas\Twital\EventDispatcher\AbstractEvent has been defined more than once; this definition is ignored, only the first definition in this file (L11-13) 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...
19
    {
20
    }
21
}
22