/**
* Calls wrapped event
*
* @param array $arguments
* @throws InvalidEventArgumentDefinitionException
*/
public function call(array $arguments)
{
$parameters = $this->method->getParameters();
if (!isset($this->annotations['param'])) {
throw new InvalidEventArgumentDefinitionException('@param annotation at method ' . $this->method->getName() . ' not found.');
}
$count = count($parameters);
for ($i = 0; $i < $count; $i++) {
$arguments[$i] = $this->validateArgument($arguments[$i], $i);
}
call_user_func_array([$this->service, $this->method->getName()], $arguments);
}