original_string: public function uninstall($moduleName)
      {
          $module = $this->findOrFalse('module_name', $moduleName);
          if ($module)
          {
              $version = $this->def($moduleName, 'version');
              if ($this->checkModuleDepends($moduleName, new Version($version)))
                  return false;
  
              $this->app['events']->fire('modules.uninstall.'.$moduleName, null);
  
              $module->delete();
  
              if (!$this->removeAssets($moduleName))
                  $this->errors->add('delete_assets', "Unable to delete assets $moduleName");
  
              if (!$this->removeModuleDirectory($moduleName))
                  $this->errors->add('delete_module', "Unable to delete $moduleName");
  
              return true;
          }
          return false;
      }
code: public function uninstall($moduleName)
      {
          $module = $this->findOrFalse('module_name', $moduleName);
          if ($module)
          {
              $version = $this->def($moduleName, 'version');
              if ($this->checkModuleDepends($moduleName, new Version($version)))
                  return false;
  
              $this->app['events']->fire('modules.uninstall.'.$moduleName, null);
  
              $module->delete();
  
              if (!$this->removeAssets($moduleName))
                  $this->errors->add('delete_assets', "Unable to delete assets $moduleName");
  
              if (!$this->removeModuleDirectory($moduleName))
                  $this->errors->add('delete_module', "Unable to delete $moduleName");
  
              return true;
          }
          return false;
      }
code_tokens: public function uninstall ( $ moduleName ) { $ module = $ this -> findOrFalse ( 'module_name' , $ moduleName ) ; if ( $ module ) { $ version = $ this -> def ( $ moduleName , 'version' ) ; if ( $ this -> checkModuleDepends ( $ moduleName , new Version ( $ version ) ) ) return false ; $ this -> app [ 'events' ] -> fire ( 'modules.uninstall.' . $ moduleName , null ) ; $ module -> delete ( ) ; if ( ! $ this -> removeAssets ( $ moduleName ) ) $ this -> errors -> add ( 'delete_assets' , "Unable to delete assets $moduleName" ) ; if ( ! $ this -> removeModuleDirectory ( $ moduleName ) ) $ this -> errors -> add ( 'delete_module' , "Unable to delete $moduleName" ) ; return true ; } return false ; }
docstring: Uninstall module and remove assets
  
  @param string $moduleName
  @return bool
docstring_tokens: Uninstall module and remove assets