Merge branch 'next-minor'

This commit is contained in:
Dylan K. Taylor 2019-12-04 11:23:30 +00:00
commit dc5d985cf4
8 changed files with 15 additions and 22 deletions

View File

@ -18,9 +18,9 @@ parameters:
path: src/PocketMine.php
-
message: "#^pocketmine\\\\inventory\\\\DoubleChestInventory\\:\\:__construct\\(\\) does not call parent constructor from pocketmine\\\\inventory\\\\ChestInventory\\.$#"
message: "#^Cannot instantiate interface pocketmine\\\\level\\\\format\\\\io\\\\LevelProvider\\.$#"
count: 1
path: src/inventory/DoubleChestInventory.php
path: src/pocketmine/Server.php
-
message: "#^Used constant pocketmine\\\\RESOURCE_PATH not found\\.$#"
@ -55,4 +55,4 @@ parameters:
message: "#^Call to an undefined method pocketmine\\\\command\\\\CommandSender\\:\\:teleport\\(\\)\\.$#"
count: 1
path: src/command/defaults/TeleportCommand.php
comment: "not actually possible, but high cost to fix warning"
# comment: "not actually possible, but high cost to fix warning"

View File

@ -1323,7 +1323,6 @@ class Server{
return $this->broadcast($message, self::BROADCAST_CHANNEL_USERS);
}
/** @var CommandSender[] $recipients */
foreach($recipients as $recipient){
$recipient->sendMessage($message);
}
@ -1351,7 +1350,6 @@ class Server{
public function broadcastTip(string $tip, ?array $recipients = null) : int{
$recipients = $recipients ?? $this->selectPermittedPlayers(self::BROADCAST_CHANNEL_USERS);
/** @var Player[] $recipients */
foreach($recipients as $recipient){
$recipient->sendTip($tip);
}
@ -1368,7 +1366,6 @@ class Server{
public function broadcastPopup(string $popup, ?array $recipients = null) : int{
$recipients = $recipients ?? $this->selectPermittedPlayers(self::BROADCAST_CHANNEL_USERS);
/** @var Player[] $recipients */
foreach($recipients as $recipient){
$recipient->sendPopup($popup);
}
@ -1389,7 +1386,6 @@ class Server{
public function broadcastTitle(string $title, string $subtitle = "", int $fadeIn = -1, int $stay = -1, int $fadeOut = -1, ?array $recipients = null) : int{
$recipients = $recipients ?? $this->selectPermittedPlayers(self::BROADCAST_CHANNEL_USERS);
/** @var Player[] $recipients */
foreach($recipients as $recipient){
$recipient->sendTitle($title, $subtitle, $fadeIn, $stay, $fadeOut);
}

View File

@ -369,12 +369,9 @@ class AvailableCommandsPacket extends DataPacket implements ClientboundPacket{
if($commandData->aliases !== null){
$addEnumFn($commandData->aliases);
}
/** @var CommandParameter[] $overload */
foreach($commandData->overloads as $overload){
/**
* @var CommandParameter[] $overload
* @var CommandParameter $parameter
*/
/** @var CommandParameter $parameter */
foreach($overload as $parameter){
if($parameter->enum !== null){
$addEnumFn($parameter->enum);

View File

@ -510,7 +510,7 @@ class PluginManager{
$eventClass = $parameters[0]->getClass();
}catch(\ReflectionException $e){ //class doesn't exist
if(isset($tags["softDepend"]) && !isset($this->plugins[$tags["softDepend"]])){
$this->server->getLogger()->debug("Not registering @softDepend listener " . Utils::getNiceClosureName($handlerClosure) . "(" . $parameters[0]->getType()->getName() . ") because plugin \"" . $tags["softDepend"] . "\" not found");
$this->server->getLogger()->debug("Not registering @softDepend listener " . Utils::getNiceClosureName($handlerClosure) . "() because plugin \"" . $tags["softDepend"] . "\" not found");
continue;
}

View File

@ -3,19 +3,19 @@ parameters:
-
message: "#^Instantiated class COM not found\\.$#"
count: 1
path: src/network/upnp/UPnP.php
path: ../../../src/network/upnp/UPnP.php
-
message: "#^Access to property \\$StaticPortMappingCollection on an unknown class COM\\.$#"
count: 2
path: src/network/upnp/UPnP.php
path: ../../../src/network/upnp/UPnP.php
-
message: "#^Caught class com_exception not found\\.$#"
count: 2
path: src/network/upnp/UPnP.php
path: ../../../src/network/upnp/UPnP.php
-
message: "#^Call to method getMessage\\(\\) on an unknown class com_exception\\.$#"
count: 1
path: src/network/upnp/UPnP.php
path: ../../../src/network/upnp/UPnP.php

View File

@ -1,12 +1,12 @@
parameters:
ignoreErrors:
-
message: "#^PHPDoc tag @param has invalid value \\(.+\\)\\: Unexpected token \"&\", expected TOKEN_VARIABLE at offset \\d+$#"
path: src
message: "#^PHPDoc tag @param has invalid value \\(.+\\)\\: Unexpected token \"&\", expected variable at offset \\d+$#"
path: ../../../src
-
message: "#^Default value of the parameter \\#\\d+ \\$[A-Za-z\\d_]+ \\(\\-?\\d+\\) of method .+\\(\\) is incompatible with type float\\.$#"
path: src
path: ../../../src
-
message: "#^Call to method count\\(\\) on an unknown class _HumbugBoxbfaeed0746fa\\\\Ds\\\\Deque\\.$#"

View File

@ -2,5 +2,5 @@ parameters:
ignoreErrors:
-
message: "#^Variable \\$GLOBALS in isset\\(\\) always exists and is not nullable\\.$#"
path: src/MemoryManager.php
path: ../../../src/MemoryManager.php

View File

@ -21,7 +21,7 @@ if [ $? -ne 0 ]; then
exit 1
fi
[ ! -f phpstan.phar ] && echo "Downloading PHPStan..." && curl -sSLO https://github.com/phpstan/phpstan/releases/download/0.11.19/phpstan.phar
[ ! -f phpstan.phar ] && echo "Downloading PHPStan..." && curl -sSLO https://github.com/phpstan/phpstan/releases/download/0.12.0/phpstan.phar
"$PHP_BINARY" phpstan.phar analyze --no-progress --memory-limit=2G || exit 1
echo "PHPStan scan succeeded"