original_string: public function getController(Request $request, array $matched)
      {
          if (null !== $request->attributes->get('_controller')) {
              return $this->createController($request->attributes->get('_controller'));
          }
  
          if ( ! $controller = $matched['_controller']) {
              throw new \InvalidArgumentException('Unable to look for controller as the "_controller" parameter is missing');
          }
  
          $callable = $this->createController($controller);
  
          if ( ! is_callable($callable)) {
              throw new \InvalidArgumentException(sprintf('Controller "%s" for URI "%s" is not callable.', $controller, $request));
          }
  
          return $callable;
      }
code: public function getController(Request $request, array $matched)
      {
          if (null !== $request->attributes->get('_controller')) {
              return $this->createController($request->attributes->get('_controller'));
          }
  
          if ( ! $controller = $matched['_controller']) {
              throw new \InvalidArgumentException('Unable to look for controller as the "_controller" parameter is missing');
          }
  
          $callable = $this->createController($controller);
  
          if ( ! is_callable($callable)) {
              throw new \InvalidArgumentException(sprintf('Controller "%s" for URI "%s" is not callable.', $controller, $request));
          }
  
          return $callable;
      }
code_tokens: public function getController ( Request $ request , array $ matched ) { if ( null !== $ request -> attributes -> get ( '_controller' ) ) { return $ this -> createController ( $ request -> attributes -> get ( '_controller' ) ) ; } if ( ! $ controller = $ matched [ '_controller' ] ) { throw new \ InvalidArgumentException ( 'Unable to look for controller as the "_controller" parameter is missing' ) ; } $ callable = $ this -> createController ( $ controller ) ; if ( ! is_callable ( $ callable ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Controller "%s" for URI "%s" is not callable.' , $ controller , $ request ) ) ; } return $ callable ; }
docstring: Get a callable controller
  
  @param  Request $request
  @param  array   $matched
  @return callable
docstring_tokens: Get a callable controller