mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
phpstan: use more class-string
This commit is contained in:
@ -23,6 +23,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block;
|
||||
|
||||
use pocketmine\block\tile\Tile;
|
||||
|
||||
class BlockIdentifier{
|
||||
|
||||
/** @var int */
|
||||
@ -31,9 +33,15 @@ class BlockIdentifier{
|
||||
private $variant;
|
||||
/** @var int|null */
|
||||
private $itemId;
|
||||
/** @var string|null */
|
||||
/**
|
||||
* @var string|null
|
||||
* @phpstan-var class-string<Tile>|null
|
||||
*/
|
||||
private $tileClass;
|
||||
|
||||
/**
|
||||
* @phpstan-param class-string<Tile>|null $tileClass
|
||||
*/
|
||||
public function __construct(int $blockId, int $variant = 0, ?int $itemId = null, ?string $tileClass = null){
|
||||
$this->blockId = $blockId;
|
||||
$this->variant = $variant;
|
||||
@ -60,6 +68,9 @@ class BlockIdentifier{
|
||||
return $this->itemId ?? ($this->blockId > 255 ? 255 - $this->blockId : $this->blockId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @phpstan-return class-string<Tile>|null
|
||||
*/
|
||||
public function getTileClass() : ?string{
|
||||
return $this->tileClass;
|
||||
}
|
||||
|
Reference in New Issue
Block a user