1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 21:40:55 +01:00

Fix call to non-existing newWorkCommands() in NuanceItemType

Summary:
rPe1b8532e2478395bd1f36baecb998adeef5bea3d introduced an implementation of `newWorkCommands()` in the child class `NuanceFormItemType` which is called in parent `NuanceItemType::buildWorkCommands()` without being defined in that parent class.
Thus define `newWorkCommands()` as an abstract class in parent class `NuanceItemType` and add an implementation returning null in the other child class `NuanceGitHubEventItemType` to make static code analyzers happy.

Test Plan: Carefully read the code.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25655
This commit is contained in:
Andre Klapper 2024-05-17 11:08:32 +02:00
parent cb5a72b5e6
commit 3349c3be17
2 changed files with 6 additions and 0 deletions

View file

@ -20,6 +20,10 @@ final class NuanceGitHubEventItemType
return $this->newRawEvent($item)->getEventFullTitle();
}
protected function newWorkCommands(NuanceItem $item) {
return array();
}
public function canUpdateItems() {
return true;
}

View file

@ -6,6 +6,8 @@ abstract class NuanceItemType
private $viewer;
private $controller;
abstract protected function newWorkCommands(NuanceItem $item);
public function setViewer(PhabricatorUser $viewer) {
$this->viewer = $viewer;
return $this;