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

dktapps/phpstan-traits-abstract-bug-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages