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

@ -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);
}
}