The type Example\Service2 has been defined more than once; this definition is ignored, only the first definition in example/SimpleWork.php (L11-13) is considered.
This check looks for classes that have been defined more than once.
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...
30
{
31
public function foo()
32
{
33
}
34
}
35
class Service2Initializer implements InitializerInterface
36
{
37
public function initialize($intance, ServiceLocatorInterface $locator)
38
{
39
if ($intance instanceof ServiceTwoAwareInterface) {
This check looks for classes that have been defined more than once.
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.