original_string: protected function migrateEnrollmentDetail($enrollmentDetail,$enrollment_id)
      {
          try {
              $enrollment = ScoolEnrollmentSubmodule::firstOrNew([
                  'enrollment_id' => $enrollment_id,
                  'module_id'     => $this->translateModuleId($enrollmentDetail->moduleid),
                  'submodule_id'  => $this->translateSubmoduleId($enrollmentDetail->submoduleid),
              ]);
              $enrollment->state='Validated';
              $enrollment->save();
          } catch (\Exception $e) {
              $this->output->error(
                  'Error migrating enrollment detail. ' . class_basename($e) . ' ' .  $e->getMessage());
          }
      }
code: protected function migrateEnrollmentDetail($enrollmentDetail,$enrollment_id)
      {
          try {
              $enrollment = ScoolEnrollmentSubmodule::firstOrNew([
                  'enrollment_id' => $enrollment_id,
                  'module_id'     => $this->translateModuleId($enrollmentDetail->moduleid),
                  'submodule_id'  => $this->translateSubmoduleId($enrollmentDetail->submoduleid),
              ]);
              $enrollment->state='Validated';
              $enrollment->save();
          } catch (\Exception $e) {
              $this->output->error(
                  'Error migrating enrollment detail. ' . class_basename($e) . ' ' .  $e->getMessage());
          }
      }
code_tokens: protected function migrateEnrollmentDetail ( $ enrollmentDetail , $ enrollment_id ) { try { $ enrollment = ScoolEnrollmentSubmodule :: firstOrNew ( [ 'enrollment_id' => $ enrollment_id , 'module_id' => $ this -> translateModuleId ( $ enrollmentDetail -> moduleid ) , 'submodule_id' => $ this -> translateSubmoduleId ( $ enrollmentDetail -> submoduleid ) , ] ) ; $ enrollment -> state = 'Validated' ; $ enrollment -> save ( ) ; } catch ( \ Exception $ e ) { $ this -> output -> error ( 'Error migrating enrollment detail. ' . class_basename ( $ e ) . ' ' . $ e -> getMessage ( ) ) ; } }
docstring: Migrate ebre-escool enrollment detail to scool enrollment.
  
  @param $enrollmentDetail
  @param $enrollment_id
docstring_tokens: Migrate ebre - escool enrollment detail to scool enrollment .