phpstan: use more class-string

This commit is contained in:
Dylan K. Taylor
2020-01-31 22:05:33 +00:00
parent f65bf76fd8
commit 89c6da13ac
7 changed files with 70 additions and 8 deletions

View File

@@ -38,6 +38,7 @@ abstract class ProjectileItem extends Item{
* Returns the entity type that this projectile creates. This should return a ::class extending Throwable.
*
* @return string class extends Throwable
* @phpstan-return class-string<Throwable>
*/
abstract public function getProjectileEntityClass() : string;

View File

@@ -33,11 +33,15 @@ use function lcg_value;
class SpawnEgg extends Item{
/** @var string */
/**
* @var string
* @phpstan-var class-string<Entity>
*/
private $entityClass;
/**
* @param string $entityClass instanceof Entity
* @phpstan-param class-string<Entity> $entityClass
*
* @throws \InvalidArgumentException
*/