added SplFixedArray generics for phpstan 0.12.9

This commit is contained in:
Dylan K. Taylor
2020-02-05 11:57:37 +00:00
parent 32d6ea0fba
commit 3f7e7352fb
10 changed files with 49 additions and 9 deletions

View File

@ -43,7 +43,10 @@ use function trim;
*/
class ItemFactory{
/** @var \SplFixedArray */
/**
* @var \SplFixedArray
* @phpstan-var \SplFixedArray<Item>
*/
private static $list = null;
/**

View File

@ -94,7 +94,10 @@ class Enchantment{
public const SLOT_ELYTRA = 0x4000;
public const SLOT_TRIDENT = 0x8000;
/** @var \SplFixedArray|Enchantment[] */
/**
* @var \SplFixedArray|Enchantment[]
* @phpstan-var \SplFixedArray<Enchantment>
*/
protected static $enchantments;
public static function init() : void{

View File

@ -25,7 +25,10 @@ namespace pocketmine\item\enchantment;
class EnchantmentList{
/** @var \SplFixedArray|EnchantmentEntry[] */
/**
* @var \SplFixedArray|EnchantmentEntry[]
* @phpstan-var \SplFixedArray<EnchantmentEntry>
*/
private $enchantments;
public function __construct(int $size){