Sort objects by timestamp
This commit is contained in:
parent
59d821511b
commit
5597176470
1 changed files with 1 additions and 1 deletions
|
|
@ -62,7 +62,7 @@ class Database {
|
|||
array_push($this->data, $patch);
|
||||
}
|
||||
private function cmp(PatchObject $a, PatchObject $b) : int {
|
||||
return strcasecmp($a->getProduct() . $a->getBranch(), $b->getProduct() . $b->getBranch());
|
||||
return $b->getTimestamp() > $a->getTimestamp();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue