Add template annotations for Parle\Stack
This commit is contained in:
parent
572cacbaf3
commit
cb45670f35
|
@ -4,6 +4,9 @@ namespace Parle;
|
|||
|
||||
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 @@ class Stack
|
|||
* 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) {}
|
||||
|
|
Loading…
Reference in New Issue