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\Entity; |
||
4 | |||
5 | use Doctrine\ORM\Mapping as ORM; |
||
6 | use FOS\UserBundle\Model\GroupInterface; |
||
7 | |||
8 | // NEXT_MAJOR: BC layer for deprecated RoleInterface on sf 3.4. Remove this if (keep the else) and move the content of the trait back into this class. Trait is final/internal by default so can be removed |
||
9 | 1 | if (interface_exists('\Symfony\Component\Security\Core\Role\RoleInterface')) { |
|
10 | /** |
||
11 | * Group |
||
12 | * |
||
13 | * @ORM\Entity |
||
14 | * @ORM\Table(name="kuma_groups") |
||
15 | */ |
||
16 | class Group implements \Symfony\Component\Security\Core\Role\RoleInterface, GroupInterface |
||
17 | { |
||
18 | use GroupPropertiesTrait; |
||
19 | } |
||
20 | } else { |
||
21 | /** |
||
22 | * Group |
||
23 | * |
||
24 | * @ORM\Entity |
||
25 | * @ORM\Table(name="kuma_groups") |
||
26 | */ |
||
27 | class Group implements GroupInterface |
||
0 ignored issues
–
show
|
|||
28 | { |
||
29 | use GroupPropertiesTrait; |
||
30 | } |
||
31 | } |
||
32 |
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.