Skip to content

Commit

Permalink
Add template annotations for Parle\Stack
Browse files Browse the repository at this point in the history
  • Loading branch information
abouvier authored and isfedorov committed Jan 13, 2024
1 parent 572cacb commit cb45670
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Parle/Stack.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use JetBrains\PhpStorm\Immutable;

/**
* @template TValue
*/
class Stack
{
/* Properties */
Expand All @@ -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;

Expand All @@ -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) {}
Expand Down

0 comments on commit cb45670

Please sign in to comment.