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;
        }
    }