/**
  * Choose n people up to limit sorted by their total number of AngelList followers
  *
  * @since 1.1
  * @param array $people an individual startup role with a user subobject
  * @param int $limit limits the number of objects returned
  * @return array the passed in people array reordered by follower count
  */
 public static function order_by_follower_count(array $people, $limit = 3)
 {
     if (count($people) === 1 || $limit < 1) {
         return $people;
     }
     $top_people = array();
     $people_count = 0;
     $people_by_followers = array();
     foreach ($people as $person) {
         if (!isset($person->tagged)) {
             continue;
         } else {
             if (isset($person->tagged->follower_count) && $person->tagged->follower_count > 0) {
                 $people_by_followers[(string) $person->tagged->follower_count][] = $person;
             } else {
                 $people_by_followers['0'][] = $person;
             }
         }
     }
     if (!empty($people_by_followers) && krsort($people_by_followers)) {
         foreach ($people_by_followers as $followers => $followers_person) {
             if ($people_count === $limit) {
                 break;
             }
             // do two or more people share the same follower count?
             if (is_array($followers_person)) {
                 // attempt to reorder by start date to break the tie
                 $followers_person = AngelList_Person::order_by_start_date($followers_person, $limit - $people_count);
                 foreach ($followers_person as $followers_person_person) {
                     if ($people_count === $limit) {
                         break;
                     }
                     $top_people[] = $followers_person_person;
                     $people_count++;
                 }
             } else {
                 $top_people[] = $followers_person;
                 $people_count++;
             }
         }
     }
     return $top_people;
 }