From 8d68398bdb4f2623af1bec846399b6ce29bd7d2c Mon Sep 17 00:00:00 2001 From: Deeka Wong Date: Mon, 2 Dec 2024 18:54:30 +0800 Subject: [PATCH] Added docs for `ProcessCollector` --- src/ProcessCollector.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ProcessCollector.php b/src/ProcessCollector.php index 10b0d87..150ee1e 100644 --- a/src/ProcessCollector.php +++ b/src/ProcessCollector.php @@ -19,6 +19,9 @@ */ class ProcessCollector { + /** + * @var array> + */ protected static array $processes = []; public static function add($name, Process $process) @@ -26,11 +29,18 @@ public static function add($name, Process $process) static::$processes[$name][] = $process; } + /** + * @param string $name + * @return Process[] + */ public static function get($name): array { return static::$processes[$name] ?? []; } + /** + * @return Process[] + */ public static function all(): array { $result = [];