original_string: public function import()
      {
          \DB::beginTransaction();
  
          try {
              $imported = ($this->insertRole()) ?: false;
              $imported = ($this->insertService()) ?: $imported;
              $imported = ($this->insertRoleServiceAccess()) ?: $imported;
              $imported = ($this->insertApp()) ?: $imported;
              $imported = ($this->insertUser()) ?: $imported;
              $imported = ($this->insertUserAppRole()) ?: $imported;
              $imported = ($this->insertOtherResource()) ?: $imported;
              $imported = ($this->insertEventScripts()) ?: $imported;
              $imported = ($this->storeFiles()) ?: $imported;
              $imported = ($this->overwrote) ?: $imported;
          } catch (\Exception $e) {
              \DB::rollBack();
              \Log::error('Failed to import package. Rolling back. ' . $e->getMessage());
  
              throw $e;
          }
  
          \DB::commit();
  
          return $imported;
      }
code: public function import()
      {
          \DB::beginTransaction();
  
          try {
              $imported = ($this->insertRole()) ?: false;
              $imported = ($this->insertService()) ?: $imported;
              $imported = ($this->insertRoleServiceAccess()) ?: $imported;
              $imported = ($this->insertApp()) ?: $imported;
              $imported = ($this->insertUser()) ?: $imported;
              $imported = ($this->insertUserAppRole()) ?: $imported;
              $imported = ($this->insertOtherResource()) ?: $imported;
              $imported = ($this->insertEventScripts()) ?: $imported;
              $imported = ($this->storeFiles()) ?: $imported;
              $imported = ($this->overwrote) ?: $imported;
          } catch (\Exception $e) {
              \DB::rollBack();
              \Log::error('Failed to import package. Rolling back. ' . $e->getMessage());
  
              throw $e;
          }
  
          \DB::commit();
  
          return $imported;
      }
code_tokens: public function import ( ) { \ DB :: beginTransaction ( ) ; try { $ imported = ( $ this -> insertRole ( ) ) ? : false ; $ imported = ( $ this -> insertService ( ) ) ? : $ imported ; $ imported = ( $ this -> insertRoleServiceAccess ( ) ) ? : $ imported ; $ imported = ( $ this -> insertApp ( ) ) ? : $ imported ; $ imported = ( $ this -> insertUser ( ) ) ? : $ imported ; $ imported = ( $ this -> insertUserAppRole ( ) ) ? : $ imported ; $ imported = ( $ this -> insertOtherResource ( ) ) ? : $ imported ; $ imported = ( $ this -> insertEventScripts ( ) ) ? : $ imported ; $ imported = ( $ this -> storeFiles ( ) ) ? : $ imported ; $ imported = ( $ this -> overwrote ) ? : $ imported ; } catch ( \ Exception $ e ) { \ DB :: rollBack ( ) ; \ Log :: error ( 'Failed to import package. Rolling back. ' . $ e -> getMessage ( ) ) ; throw $ e ; } \ DB :: commit ( ) ; return $ imported ; }
docstring: Imports the packages.
  
  @throws \Exception
  @return bool
docstring_tokens: Imports the packages .