original_string: public function get_authors_for_posts(array $posts) : array {
          $authorids = array_reduce($posts, function($carry, $post) {
              $carry[$post->get_author_id()] = true;
              return $carry;
          }, []);
          $authorids = array_keys($authorids);
          return $this->get_from_ids($authorids);
      }
code: public function get_authors_for_posts(array $posts) : array {
          $authorids = array_reduce($posts, function($carry, $post) {
              $carry[$post->get_author_id()] = true;
              return $carry;
          }, []);
          $authorids = array_keys($authorids);
          return $this->get_from_ids($authorids);
      }
code_tokens: public function get_authors_for_posts ( array $ posts ) : array { $ authorids = array_reduce ( $ posts , function ( $ carry , $ post ) { $ carry [ $ post -> get_author_id ( ) ] = true ; return $ carry ; } , [ ] ) ; $ authorids = array_keys ( $ authorids ) ; return $ this -> get_from_ids ( $ authorids ) ; }
docstring: Get the authors for the given posts.
  
  Returns a distinct list of authors indexed by author id.
  
  @param post_entity[] $posts The list of posts
  @return author_entity[]
docstring_tokens: Get the authors for the given posts .