original_string: public function resolveRequirements(Plugin $plugin, $moodleVersion)
      {
          $map = [
              'auth'       => new AuthRequirements($plugin, $moodleVersion),
              'block'      => new BlockRequirements($plugin, $moodleVersion),
              'filter'     => new FilterRequirements($plugin, $moodleVersion),
              'format'     => new FormatRequirements($plugin, $moodleVersion),
              'mod'        => new ModuleRequirements($plugin, $moodleVersion),
              'qtype'      => new QuestionRequirements($plugin, $moodleVersion),
              'repository' => new RepositoryRequirements($plugin, $moodleVersion),
              'theme'      => new ThemeRequirements($plugin, $moodleVersion),
          ];
  
          if (array_key_exists($plugin->type, $map)) {
              return $map[$plugin->type];
          }
  
          return new GenericRequirements($plugin, $moodleVersion);
      }
code: public function resolveRequirements(Plugin $plugin, $moodleVersion)
      {
          $map = [
              'auth'       => new AuthRequirements($plugin, $moodleVersion),
              'block'      => new BlockRequirements($plugin, $moodleVersion),
              'filter'     => new FilterRequirements($plugin, $moodleVersion),
              'format'     => new FormatRequirements($plugin, $moodleVersion),
              'mod'        => new ModuleRequirements($plugin, $moodleVersion),
              'qtype'      => new QuestionRequirements($plugin, $moodleVersion),
              'repository' => new RepositoryRequirements($plugin, $moodleVersion),
              'theme'      => new ThemeRequirements($plugin, $moodleVersion),
          ];
  
          if (array_key_exists($plugin->type, $map)) {
              return $map[$plugin->type];
          }
  
          return new GenericRequirements($plugin, $moodleVersion);
      }
code_tokens: public function resolveRequirements ( Plugin $ plugin , $ moodleVersion ) { $ map = [ 'auth' => new AuthRequirements ( $ plugin , $ moodleVersion ) , 'block' => new BlockRequirements ( $ plugin , $ moodleVersion ) , 'filter' => new FilterRequirements ( $ plugin , $ moodleVersion ) , 'format' => new FormatRequirements ( $ plugin , $ moodleVersion ) , 'mod' => new ModuleRequirements ( $ plugin , $ moodleVersion ) , 'qtype' => new QuestionRequirements ( $ plugin , $ moodleVersion ) , 'repository' => new RepositoryRequirements ( $ plugin , $ moodleVersion ) , 'theme' => new ThemeRequirements ( $ plugin , $ moodleVersion ) , ] ; if ( array_key_exists ( $ plugin -> type , $ map ) ) { return $ map [ $ plugin -> type ] ; } return new GenericRequirements ( $ plugin , $ moodleVersion ) ; }
docstring: Find the requirements for a given plugin type.
  
  @param Plugin $plugin
  @param int    $moodleVersion
  
  @return AbstractRequirements
docstring_tokens: Find the requirements for a given plugin type .