Completed
Pull Request — master (#1583)
by Jeroen
41:02 queued 38:49
created

ElasticaEvent

Complexity

Total Complexity 0

Size/Duplication

Total Lines 3
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 0
lcom 0
cbo 1
dl 0
loc 3
ccs 0
cts 0
cp 0
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the FOSElasticaBundle package.
5
 *
6
 * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
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
namespace FOS\ElasticaBundle\Event;
13
14
use Symfony\Contracts\EventDispatcher\Event as BaseEvent;
15
use Symfony\Component\EventDispatcher\Event as LegacyBaseEvent;
16
17 1
if (class_exists(BaseEvent::class)) {
18
    class ElasticaEvent extends BaseEvent
19
    {
20
    }
21
} else {
22
    // Support Symfony 4.2 and before
23
    class ElasticaEvent extends LegacyBaseEvent
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type FOS\ElasticaBundle\Event\ElasticaEvent has been defined more than once; this definition is ignored, only the first definition in this file (L18-20) 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...
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated with message: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
24
    {
25
    }
26
}
27