Event
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 3
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 0
lcom 0
cbo 1
dl 0
loc 3
c 0
b 0
f 0
1
<?php
2
3
namespace Gesdinet\JWTRefreshTokenBundle\Event;
4
5
use Symfony\Component\EventDispatcher\Event as BaseEvent;
6
use Symfony\Component\EventDispatcher\EventDispatcher;
7
use Symfony\Contracts\EventDispatcher\Event as ContractsBaseEvent;
8
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
9
10
if (is_subclass_of(EventDispatcher::class, EventDispatcherInterface::class)) {
0 ignored issues
show
Bug introduced by
Due to PHP Bug #53727, is_subclass_of might return inconsistent results on some PHP versions if \Symfony\Contracts\Event...patcherInterface::class can be an interface. If so, you could instead use ReflectionClass::implementsInterface.
Loading history...
11
    class Event extends ContractsBaseEvent
12
    {
13
    }
14
} else {
15
    class Event extends BaseEvent
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type Gesdinet\JWTRefreshTokenBundle\Event\Event 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...
16
    {
17
    }
18
}
19