Ejemplo n.º 1
0
 /**
  * Compares two commits by age
  *
  * @param GitPHP_Commit $a first commit
  * @param GitPHP_Commit $b second commit
  * @return integer comparison result
  */
 public static function CompareAge($a, $b)
 {
     if ($a->GetAge() === $b->GetAge()) {
         // fall back on author epoch
         return 0 - GitPHP_Commit::CompareAuthorEpoch($a, $b);
     }
     return $a->GetAge() < $b->GetAge() ? -1 : 1;
 }