original_string: public function finished()
      {
          if ($this->tasksCount == 0) {
              if (isset($this->callback)) {
                  $results = array();
                  foreach ($this->tasks as $task) {
                      $results[] = $task->result;
                  }
  
                  call_user_func($this->callback, $results);
              }
  
              return true;
          }
  
          return false;
      }
code: public function finished()
      {
          if ($this->tasksCount == 0) {
              if (isset($this->callback)) {
                  $results = array();
                  foreach ($this->tasks as $task) {
                      $results[] = $task->result;
                  }
  
                  call_user_func($this->callback, $results);
              }
  
              return true;
          }
  
          return false;
      }
code_tokens: public function finished ( ) { if ( $ this -> tasksCount == 0 ) { if ( isset ( $ this -> callback ) ) { $ results = array ( ) ; foreach ( $ this -> tasks as $ task ) { $ results [ ] = $ task -> result ; } call_user_func ( $ this -> callback , $ results ) ; } return true ; } return false ; }
docstring: Is this set finished running?
  
  This function will return true if all of the tasks in the set have
  finished running. If they have we also run the set callbacks if there
  is one.
  
  @return bool
docstring_tokens: Is this set finished running?