phpstan 0.12.57

This commit is contained in:
Dylan K. Taylor 2020-11-21 18:07:14 +00:00
parent 027ec129b6
commit bc208e11f4
3 changed files with 12 additions and 8 deletions

View File

@ -51,7 +51,7 @@
"composer-runtime-api": "^2.0"
},
"require-dev": {
"phpstan/phpstan": "0.12.54",
"phpstan/phpstan": "0.12.57",
"phpstan/phpstan-phpunit": "^0.12.6",
"phpstan/phpstan-strict-rules": "^0.12.2",
"phpunit/phpunit": "^9.2"

14
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "2ebc35f61a45aaa7bb3e6185b6bfbf90",
"content-hash": "b96dbf17a1d0fed7b4545e72afbae5b4",
"packages": [
{
"name": "adhocore/json-comment",
@ -1518,16 +1518,16 @@
},
{
"name": "phpstan/phpstan",
"version": "0.12.54",
"version": "0.12.57",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "45c7b999a4b7dd9ac5558bdaaf23dcebbef88223"
"reference": "f9909d1d0c44b4cbaf72babcf80e8f14d6fdd55b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/45c7b999a4b7dd9ac5558bdaaf23dcebbef88223",
"reference": "45c7b999a4b7dd9ac5558bdaaf23dcebbef88223",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/f9909d1d0c44b4cbaf72babcf80e8f14d6fdd55b",
"reference": "f9909d1d0c44b4cbaf72babcf80e8f14d6fdd55b",
"shasum": ""
},
"require": {
@ -1558,7 +1558,7 @@
"description": "PHPStan - PHP Static Analysis Tool",
"support": {
"issues": "https://github.com/phpstan/phpstan/issues",
"source": "https://github.com/phpstan/phpstan/tree/0.12.54"
"source": "https://github.com/phpstan/phpstan/tree/0.12.57"
},
"funding": [
{
@ -1574,7 +1574,7 @@
"type": "tidelift"
}
],
"time": "2020-11-05T13:36:26+00:00"
"time": "2020-11-21T12:53:28+00:00"
},
{
"name": "phpstan/phpstan-phpunit",

View File

@ -27,6 +27,7 @@ use Mdanter\Ecc\Crypto\Key\PrivateKeyInterface;
use Mdanter\Ecc\Crypto\Key\PublicKeyInterface;
use Mdanter\Ecc\EccFactory;
use pocketmine\scheduler\AsyncTask;
use pocketmine\utils\AssumptionFailedError;
use function random_bytes;
class PrepareEncryptionTask extends AsyncTask{
@ -74,6 +75,9 @@ class PrepareEncryptionTask extends AsyncTask{
* @phpstan-var \Closure(string $encryptionKey, string $handshakeJwt) : void $callback
*/
$callback = $this->fetchLocal(self::TLS_KEY_ON_COMPLETION);
if($this->aesKey === null || $this->handshakeJwt === null){
throw new AssumptionFailedError("Something strange happened here ...");
}
$callback($this->aesKey, $this->handshakeJwt);
}
}