original_string: public function onKernelRequest(GetResponseEvent $event)
      {
          if (null === $module = $event->getRequest()->get('module')) {
              return;
          }
  
          if (!$module instanceof ModuleInterface) {
              $module = $this->getModularRouter()->getModuleByRequest($event->getRequest());
          }
  
          // todo remove current module functionality, as it can lead to unexpected behavior
          $this->getModuleManager()->setCurrentModule($module);
      }
code: public function onKernelRequest(GetResponseEvent $event)
      {
          if (null === $module = $event->getRequest()->get('module')) {
              return;
          }
  
          if (!$module instanceof ModuleInterface) {
              $module = $this->getModularRouter()->getModuleByRequest($event->getRequest());
          }
  
          // todo remove current module functionality, as it can lead to unexpected behavior
          $this->getModuleManager()->setCurrentModule($module);
      }
code_tokens: public function onKernelRequest ( GetResponseEvent $ event ) { if ( null === $ module = $ event -> getRequest ( ) -> get ( 'module' ) ) { return ; } if ( ! $ module instanceof ModuleInterface ) { $ module = $ this -> getModularRouter ( ) -> getModuleByRequest ( $ event -> getRequest ( ) ) ; } // todo remove current module functionality, as it can lead to unexpected behavior $ this -> getModuleManager ( ) -> setCurrentModule ( $ module ) ; }
docstring: Handles actions before the kernel matches the controller.
  
  @param GetResponseEvent $event
docstring_tokens: Handles actions before the kernel matches the controller .