phpstan 0.12.63

This commit is contained in:
Dylan K. Taylor
2020-12-18 00:32:55 +00:00
parent 6afbd1f55c
commit 0604dfc9e5
13 changed files with 62 additions and 23 deletions

View File

@ -28,6 +28,7 @@ use pocketmine\network\mcpe\protocol\ProtocolInfo;
use pocketmine\plugin\PluginBase;
use pocketmine\plugin\PluginLoadOrder;
use pocketmine\plugin\PluginManager;
use pocketmine\utils\AssumptionFailedError;
use pocketmine\utils\Utils;
use pocketmine\utils\VersionString;
use function base64_encode;
@ -166,7 +167,8 @@ class CrashDump{
if($json === false){
throw new \RuntimeException("Failed to encode crashdump JSON: " . json_last_error_msg());
}
$this->encodedData = zlib_encode($json, ZLIB_ENCODING_DEFLATE, 9);
$zlibEncoded = zlib_encode($json, ZLIB_ENCODING_DEFLATE, 9);
if($zlibEncoded === false) throw new AssumptionFailedError("ZLIB compression failed");
foreach(str_split(base64_encode($this->encodedData), 76) as $line){
$this->addLine($line);
}