Completed
Push — master ( 1dbefb...c77374 )
by Jeroen
32s queued 11s
created

src/Kunstmaan/AdminBundle/Event/BcEvent.php (2 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Kunstmaan\AdminBundle\Event;
4
5
use Symfony\Component\EventDispatcher\Event as LegacyEvent;
6
use Symfony\Contracts\EventDispatcher\Event;
7
8 1
if (!class_exists(Event::class)) {
9
    /**
10
     * Symfony 3.4
11
     *
12
     * @internal
13
     */
14
    abstract class BcEvent extends LegacyEvent
0 ignored issues
show
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...
15
    {
16
    }
17
} else {
18
    /**
19
     * Symfony >= 4.3
20
     *
21
     * @internal
22
     */
23
    abstract class BcEvent extends Event
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type Kunstmaan\AdminBundle\Event\BcEvent has been defined more than once; this definition is ignored, only the first definition in this file (L14-16) 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...
24
    {
25
    }
26
}
27