From cb45670f35e23fa36a5ae50cd395057c13fb20ce Mon Sep 17 00:00:00 2001 From: Alexandre Bouvier Date: Fri, 29 Dec 2023 23:06:29 +0100 Subject: [PATCH] Add template annotations for Parle\Stack --- Parle/Stack.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Parle/Stack.php b/Parle/Stack.php index 3f7615ca6..72352a9bc 100644 --- a/Parle/Stack.php +++ b/Parle/Stack.php @@ -4,6 +4,9 @@ use JetBrains\PhpStorm\Immutable; +/** + * @template TValue + */ class Stack { /* Properties */ @@ -20,7 +23,7 @@ class Stack public $size = 0; /** - * @var mixed Element on the top of the stack. + * @var TValue Element on the top of the stack. */ public $top; @@ -37,7 +40,7 @@ public function pop(): void {} * Push an item into the stack * * @link https://php.net/manual/en/parle-stack.push.php - * @param mixed $item Variable to be pushed. + * @param TValue $item Variable to be pushed. * @return void */ public function push($item) {}