original_string: public static function resolve(array $controllers)
      {
          $callbacks = [];
  
          foreach ($controllers as $controller) {
              $qualifiedController = '\\' . trim($controller, '\\');
  
              $callbacks[$controller] = function (ContainerInterface $container) use ($qualifiedController) {
                  $controller = new $qualifiedController();
  
                  if ($controller instanceof Controller) {
                      $controller->setContainer($container);
                  }
  
                  return $controller;
              };
          }
  
          return $callbacks;
      }
code: public static function resolve(array $controllers)
      {
          $callbacks = [];
  
          foreach ($controllers as $controller) {
              $qualifiedController = '\\' . trim($controller, '\\');
  
              $callbacks[$controller] = function (ContainerInterface $container) use ($qualifiedController) {
                  $controller = new $qualifiedController();
  
                  if ($controller instanceof Controller) {
                      $controller->setContainer($container);
                  }
  
                  return $controller;
              };
          }
  
          return $callbacks;
      }
code_tokens: public static function resolve ( array $ controllers ) { $ callbacks = [ ] ; foreach ( $ controllers as $ controller ) { $ qualifiedController = '\\' . trim ( $ controller , '\\' ) ; $ callbacks [ $ controller ] = function ( ContainerInterface $ container ) use ( $ qualifiedController ) { $ controller = new $ qualifiedController ( ) ; if ( $ controller instanceof Controller ) { $ controller -> setContainer ( $ container ) ; } return $ controller ; } ; } return $ callbacks ; }
docstring: Create service callbacks.
  
  @param array $controllers
  
  @return array
docstring_tokens: Create service callbacks .