Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Latest commit

 

History

History
18 lines (14 loc) · 1 KB

File metadata and controls

18 lines (14 loc) · 1 KB

phpstan-traits-abstract-bug-test

This repository demonstrates an edge case with traits handling in phpstan 0.12.26+.

TL;DR

EnchantTable extends Tile and using NameableTrait to fill in abstract methods is OK. EnchantTable extends Spawnable (which in turn extends Tile) raises the following FPs:

 ------ ---------------------------------------------------------------------------------------------------------------------------
  Line   EnchantTable.php
 ------ ---------------------------------------------------------------------------------------------------------------------------
  26     Non-abstract class pocketmine\tile\EnchantTable contains abstract method readSaveData() from class pocketmine\tile\Tile.
  26     Non-abstract class pocketmine\tile\EnchantTable contains abstract method writeSaveData() from class pocketmine\tile\Tile.
 ------ ---------------------------------------------------------------------------------------------------------------------------

 [ERROR] Found 2 errors