original_string: protected function translateSubmoduleId($oldSubModuleId)
      {
          $submodule = Submodule::where('name',StudySubModule::findOrFail($oldSubModuleId)->name)->first();
          if ( $submodule != null ) {
              return $submodule->id;
          }
          throw new SubmoduleNotFoundByNameException();
      }
code: protected function translateSubmoduleId($oldSubModuleId)
      {
          $submodule = Submodule::where('name',StudySubModule::findOrFail($oldSubModuleId)->name)->first();
          if ( $submodule != null ) {
              return $submodule->id;
          }
          throw new SubmoduleNotFoundByNameException();
      }
code_tokens: protected function translateSubmoduleId ( $ oldSubModuleId ) { $ submodule = Submodule :: where ( 'name' , StudySubModule :: findOrFail ( $ oldSubModuleId ) -> name ) -> first ( ) ; if ( $ submodule != null ) { return $ submodule -> id ; } throw new SubmoduleNotFoundByNameException ( ) ; }
docstring: Translate submodule id.
  
  @param $oldSubModuleId
  @return
  @throws SubmoduleNotFoundByNameException
docstring_tokens: Translate submodule id .