Add @see docs so PhpStorm can see dynamic constructor usages

PhpStorm can't see constructor usages when the class name is dynamic. This causes maintenance problems because cross-referencing constructors called like this doesn't show up dynamic calls.
This commit is contained in:
Dylan K. Taylor
2018-08-19 16:00:15 +01:00
parent 0cdf4d0c55
commit 5df601c817
5 changed files with 12 additions and 1 deletions

View File

@ -103,6 +103,7 @@ abstract class Tile extends Position{
public static function createTile($type, Level $level, CompoundTag $nbt, ...$args) : ?Tile{
if(isset(self::$knownTiles[$type])){
$class = self::$knownTiles[$type];
/** @see Tile::__construct() */
return new $class($level, $nbt, ...$args);
}