original_string: public function validatePlugin($plugin)
      {
          if ($plugin instanceof RouteInterface) {
              // we're okay
              return;
          }
  
          throw new RuntimeException(sprintf(
              'Plugin of type %s is invalid; must implement %s\RouteInterface',
              (is_object($plugin) ? get_class($plugin) : gettype($plugin)),
              __NAMESPACE__
          ));
      }
code: public function validatePlugin($plugin)
      {
          if ($plugin instanceof RouteInterface) {
              // we're okay
              return;
          }
  
          throw new RuntimeException(sprintf(
              'Plugin of type %s is invalid; must implement %s\RouteInterface',
              (is_object($plugin) ? get_class($plugin) : gettype($plugin)),
              __NAMESPACE__
          ));
      }
code_tokens: public function validatePlugin ( $ plugin ) { if ( $ plugin instanceof RouteInterface ) { // we're okay return ; } throw new RuntimeException ( sprintf ( 'Plugin of type %s is invalid; must implement %s\RouteInterface' , ( is_object ( $ plugin ) ? get_class ( $ plugin ) : gettype ( $ plugin ) ) , __NAMESPACE__ ) ) ; }
docstring: Validate the plugin.
  
  Checks that the filter loaded is either a valid callback or an instance
  of FilterInterface.
  
  @param mixed $plugin
  
  @throws RuntimeException if invalid
docstring_tokens: Validate the plugin .