original_string: protected function validate_item($item) {
  
          $allowed = array(
              'user'              => true,
              'grouping'          => true,
              'group'             => true,
              'role'              => true,
              'file'              => true,
              'scale'             => true,
              'outcome'           => true,
              'grade_item'        => true,
              'question_category' => true
          );
  
          if (!isset($allowed[$item])) {
              throw new coding_exception('Invalid inforef item type');
          }
      }
code: protected function validate_item($item) {
  
          $allowed = array(
              'user'              => true,
              'grouping'          => true,
              'group'             => true,
              'role'              => true,
              'file'              => true,
              'scale'             => true,
              'outcome'           => true,
              'grade_item'        => true,
              'question_category' => true
          );
  
          if (!isset($allowed[$item])) {
              throw new coding_exception('Invalid inforef item type');
          }
      }
code_tokens: protected function validate_item ( $ item ) { $ allowed = array ( 'user' => true , 'grouping' => true , 'group' => true , 'role' => true , 'file' => true , 'scale' => true , 'outcome' => true , 'grade_item' => true , 'question_category' => true ) ; if ( ! isset ( $ allowed [ $ item ] ) ) { throw new coding_exception ( 'Invalid inforef item type' ) ; } }
docstring: Makes sure that the given name is a valid citizen of inforef.xml file
  
  @see backup_helper::get_inforef_itemnames()
  @param string $item the name of reference (like user, file, scale, outcome or grade_item)
  @throws coding_exception
docstring_tokens: Makes sure that the given name is a valid citizen of inforef . xml file