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

@ -141,6 +141,10 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
$this->server->getPluginManager()->callEvent($ev);
$class = $ev->getPlayerClass();
/**
* @var Player $player
* @see Player::__construct()
*/
$player = new $class($this, $ev->getAddress(), $ev->getPort());
$this->players[$identifier] = $player;
$this->identifiersACK[$identifier] = 0;