New feature: Branch name for software products

This commit is contained in:
Steffen Lange 2020-04-01 17:25:40 +02:00
parent dd3be30e56
commit 3d037ec2b3
5 changed files with 13 additions and 6 deletions

View file

@ -45,16 +45,16 @@ class Database {
}
function find(string $id) : PatchObject {
foreach ($this->data as $obj) {
if (strcmp($obj->GetId(), $id) == 0) {
if (strcmp($obj->getId(), $id) == 0) {
return $obj;
}
}
return new PatchObject();
}
function addOrUpdate(PatchObject $patch) {
$patch->SetTimestamp($this->time);
$patch->setTimestamp($this->time);
foreach ($this->data as &$obj) {
if (strcmp($obj->GetId(), $patch->GetId()) == 0) {
if (strcmp($obj->getId(), $patch->getId()) == 0) {
$obj = $patch;
return;
}