From f9e5630bab68a306b38fdf752d94109d1ef62a8c Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Mon, 17 Feb 2025 00:33:55 +0100 Subject: [PATCH] Add some trivial Herald related PhpDoc comments Summary: Self-explanatory. Test Plan: Read and play with 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/D25884 --- src/applications/herald/action/HeraldAction.php | 3 +++ src/applications/herald/engine/HeraldEffect.php | 16 ++++++++++++++++ src/applications/herald/storage/HeraldRule.php | 3 +++ 3 files changed, 22 insertions(+) diff --git a/src/applications/herald/action/HeraldAction.php b/src/applications/herald/action/HeraldAction.php index 38542cf5ed..2e08f2ff9d 100644 --- a/src/applications/herald/action/HeraldAction.php +++ b/src/applications/herald/action/HeraldAction.php @@ -122,6 +122,9 @@ abstract class HeraldAction extends Phobject { return $this; } + /* + * @return HeraldAdapter HeraldAdapter class of the action + **/ final public function getAdapter() { return $this->adapter; } diff --git a/src/applications/herald/engine/HeraldEffect.php b/src/applications/herald/engine/HeraldEffect.php index 52d86cf5df..31bd9643a5 100644 --- a/src/applications/herald/engine/HeraldEffect.php +++ b/src/applications/herald/engine/HeraldEffect.php @@ -13,6 +13,9 @@ final class HeraldEffect extends Phobject { return $this; } + /** + * @return string PHID of the object that Herald is applied on + */ public function getObjectPHID() { return $this->objectPHID; } @@ -22,6 +25,9 @@ final class HeraldEffect extends Phobject { return $this; } + /** + * @return string ACTIONCONST of the HeraldAction + */ public function getAction() { return $this->action; } @@ -31,6 +37,9 @@ final class HeraldEffect extends Phobject { return $this; } + /** + * @return array|null + */ public function getTarget() { return $this->target; } @@ -40,6 +49,9 @@ final class HeraldEffect extends Phobject { return $this; } + /** + * @return HeraldRule + */ public function getRule() { return $this->rule; } @@ -49,6 +61,10 @@ final class HeraldEffect extends Phobject { return $this; } + /** + * @return string Reason why Herald effect was applied, for example + * "Conditions were met for H123 RuleName" + */ public function getReason() { return $this->reason; } diff --git a/src/applications/herald/storage/HeraldRule.php b/src/applications/herald/storage/HeraldRule.php index 07be991bda..c489ee61f8 100644 --- a/src/applications/herald/storage/HeraldRule.php +++ b/src/applications/herald/storage/HeraldRule.php @@ -265,6 +265,9 @@ final class HeraldRule extends HeraldDAO ->addString($this->getName()); } + /** + * @return string Name of the rule, for example "H123 RuleName (Disabled)" + */ public function getEditorDisplayName() { $name = pht('%s %s', $this->getMonogram(), $this->getName());