original_string: protected function modules(Course $course) {
          $modules = $course->modules()->active()->get();
          $sortedModules = $modules->sortBy(
              function ($module, $key) {
                  return $module->order;
              }
          );
          return $this->validateCollection($sortedModules);
      }
code: protected function modules(Course $course) {
          $modules = $course->modules()->active()->get();
          $sortedModules = $modules->sortBy(
              function ($module, $key) {
                  return $module->order;
              }
          );
          return $this->validateCollection($sortedModules);
      }
code_tokens: protected function modules ( Course $ course ) { $ modules = $ course -> modules ( ) -> active ( ) -> get ( ) ; $ sortedModules = $ modules -> sortBy ( function ( $ module , $ key ) { return $ module -> order ; } ) ; return $ this -> validateCollection ( $ sortedModules ) ; }
docstring: Get the modules to migrate.
  
  @param Course $course
  @return \Illuminate\Database\Eloquent\Collection|static[]
docstring_tokens: Get the modules to migrate .