protected function checkMethod($subscriber, $event, $method)
    {
        if (!is_string($method)) {
            $message = 'Listener definition for event "%s" contains an invalid method reference: %s';
            $this->addProblem(sprintf($message, $event, $this->exporter->export($method)));
            return;
        }
        if (!method_exists($subscriber, $method)) {
            $message = 'Listener definition for event "%s" references method "%s", '
                     . 'but the method does not exist on subscriber.';
            $this->addProblem(sprintf($message, $event, $method));
            return;
        }
        if (!is_callable(array($subscriber, $method))) {
            $message = 'Listener definition for event "%s" references method "%s", '
                     . 'but the method is not publicly accessible.';
            $this->addProblem(sprintf($message, $event, $method));
            return;
        }
    }
protected function checkMethod($subscriber, $event, $method)
    {
        if (!is_string($method)) {
            $message = 'Listener definition for event "%s" contains an invalid method reference: %s';
            $this->addProblem(sprintf($message, $event, $this->exporter->export($method)));
            return;
        }
        if (!method_exists($subscriber, $method)) {
            $message = 'Listener definition for event "%s" references method "%s", '
                     . 'but the method does not exist on subscriber.';
            $this->addProblem(sprintf($message, $event, $method));
            return;
        }
        if (!is_callable(array($subscriber, $method))) {
            $message = 'Listener definition for event "%s" references method "%s", '
                     . 'but the method is not publicly accessible.';
            $this->addProblem(sprintf($message, $event, $method));
            return;
        }
    }
protected function checkMethod ( $ subscriber , $ event , $ method ) { if ( ! is_string ( $ method ) ) { $ message = 'Listener definition for event "%s" contains an invalid method reference: %s' ; $ this -> addProblem ( sprintf ( $ message , $ event , $ this -> exporter -> export ( $ method ) ) ) ; return ; } if ( ! method_exists ( $ subscriber , $ method ) ) { $ message = 'Listener definition for event "%s" references method "%s", ' . 'but the method does not exist on subscriber.' ; $ this -> addProblem ( sprintf ( $ message , $ event , $ method ) ) ; return ; } if ( ! is_callable ( array ( $ subscriber , $ method ) ) ) { $ message = 'Listener definition for event "%s" references method "%s", ' . 'but the method is not publicly accessible.' ; $ this -> addProblem ( sprintf ( $ message , $ event , $ method ) ) ; return ; } }
Checks the given subscriber method.

@param EventSubscriberInterface $subscriber
@param string $event
@param string|mixed $method
Checks the given subscriber method .