original_string: protected function convert_assessments_to_links($assessments) {
          $authorlinks    = array(); // [authorid]    => array(reviewerid, reviewerid, ...)
          $reviewerlinks  = array(); // [reviewerid]  => array(authorid, authorid, ...)
          foreach ($assessments as $assessment) {
              if (!isset($authorlinks[$assessment->authorid])) {
                  $authorlinks[$assessment->authorid] = array();
              }
              if (!isset($reviewerlinks[$assessment->reviewerid])) {
                  $reviewerlinks[$assessment->reviewerid] = array();
              }
              $authorlinks[$assessment->authorid][]   = $assessment->reviewerid;
              $reviewerlinks[$assessment->reviewerid][] = $assessment->authorid;
              }
          return array($authorlinks, $reviewerlinks);
      }
code: protected function convert_assessments_to_links($assessments) {
          $authorlinks    = array(); // [authorid]    => array(reviewerid, reviewerid, ...)
          $reviewerlinks  = array(); // [reviewerid]  => array(authorid, authorid, ...)
          foreach ($assessments as $assessment) {
              if (!isset($authorlinks[$assessment->authorid])) {
                  $authorlinks[$assessment->authorid] = array();
              }
              if (!isset($reviewerlinks[$assessment->reviewerid])) {
                  $reviewerlinks[$assessment->reviewerid] = array();
              }
              $authorlinks[$assessment->authorid][]   = $assessment->reviewerid;
              $reviewerlinks[$assessment->reviewerid][] = $assessment->authorid;
              }
          return array($authorlinks, $reviewerlinks);
      }
code_tokens: protected function convert_assessments_to_links ( $ assessments ) { $ authorlinks = array ( ) ; // [authorid]    => array(reviewerid, reviewerid, ...) $ reviewerlinks = array ( ) ; // [reviewerid]  => array(authorid, authorid, ...) foreach ( $ assessments as $ assessment ) { if ( ! isset ( $ authorlinks [ $ assessment -> authorid ] ) ) { $ authorlinks [ $ assessment -> authorid ] = array ( ) ; } if ( ! isset ( $ reviewerlinks [ $ assessment -> reviewerid ] ) ) { $ reviewerlinks [ $ assessment -> reviewerid ] = array ( ) ; } $ authorlinks [ $ assessment -> authorid ] [ ] = $ assessment -> reviewerid ; $ reviewerlinks [ $ assessment -> reviewerid ] [ ] = $ assessment -> authorid ; } return array ( $ authorlinks , $ reviewerlinks ) ; }
docstring: Extracts the information about reviews from the authors' and reviewers' perspectives
  
  @param array $assessments array of assessments as returned by {@link workshop::get_all_assessments()}
  @return array of two arrays
docstring_tokens: Extracts the information about reviews from the authors and reviewers perspectives