original_string: public function canUninstall($module_id)
      {
          if ($this->module->isActiveTheme($module_id)) {
              $error = $this->translation->text('Modules with "theme" type and active status cannot be disabled/uninstalled');
              throw new UnexpectedValueException($error);
          }
  
          if ($this->module->isLocked($module_id)) {
              throw new UnexpectedValueException($this->translation->text('Module is locked in code'));
          }
  
          return $this->checkDependentModules($module_id, $this->module->getList());
      }
code: public function canUninstall($module_id)
      {
          if ($this->module->isActiveTheme($module_id)) {
              $error = $this->translation->text('Modules with "theme" type and active status cannot be disabled/uninstalled');
              throw new UnexpectedValueException($error);
          }
  
          if ($this->module->isLocked($module_id)) {
              throw new UnexpectedValueException($this->translation->text('Module is locked in code'));
          }
  
          return $this->checkDependentModules($module_id, $this->module->getList());
      }
code_tokens: public function canUninstall ( $ module_id ) { if ( $ this -> module -> isActiveTheme ( $ module_id ) ) { $ error = $ this -> translation -> text ( 'Modules with "theme" type and active status cannot be disabled/uninstalled' ) ; throw new UnexpectedValueException ( $ error ) ; } if ( $ this -> module -> isLocked ( $ module_id ) ) { throw new UnexpectedValueException ( $ this -> translation -> text ( 'Module is locked in code' ) ) ; } return $ this -> checkDependentModules ( $ module_id , $ this -> module -> getList ( ) ) ; }
docstring: Whether a given module can be un-installed
  @param string $module_id
  @return bool
  @throws UnexpectedValueException
docstring_tokens: Whether a given module can be un - installed