This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
21
{
22
1
$method = $this->getMethodNameFromEvent($event);
23
24
// if method is not exists is not a critical error
25
1
if (method_exists($this, $method)) {
26
1
call_user_func([$this, $method], $event);
27
1
}
28
1
}
29
30
/**
31
* Get handler method name from event.
32
*
33
* Override this method if you want to change algorithm to generate the handler method name.
34
*
35
* @param EventInterface $event
36
*
37
* @return string
38
*/
39
1
protected function getMethodNameFromEvent(EventInterface $event)
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.