diff --git a/phpseclib/Crypt/EC/Formats/Signature/IEEE.php b/phpseclib/Crypt/EC/Formats/Signature/IEEE.php index 69139da4..cb98daa7 100644 --- a/phpseclib/Crypt/EC/Formats/Signature/IEEE.php +++ b/phpseclib/Crypt/EC/Formats/Signature/IEEE.php @@ -15,6 +15,8 @@ * @link http://phpseclib.sourceforge.net */ +declare(strict_types=1); + namespace phpseclib3\Crypt\EC\Formats\Signature; use phpseclib3\Math\BigInteger; @@ -51,12 +53,8 @@ abstract class IEEE /** * Returns a signature in the appropriate format - * - * @param \phpseclib3\Math\BigInteger $r - * @param \phpseclib3\Math\BigInteger $s - * @return string */ - public static function save(BigInteger $r, BigInteger $s) + public static function save(BigInteger $r, BigInteger $s): string { $r = $r->toBytes(); $s = $s->toBytes(); diff --git a/tests/Unit/Crypt/EC/KeyTest.php b/tests/Unit/Crypt/EC/KeyTest.php index 6d1aeb18..8241d2d0 100644 --- a/tests/Unit/Crypt/EC/KeyTest.php +++ b/tests/Unit/Crypt/EC/KeyTest.php @@ -696,7 +696,7 @@ cN6W+k8UvGf+Y/lDWNbFitQocabsDUvSN0edHH3UKP5QPTz4cOlyIPMrXQ== /** * @group github1956 */ - public function testIEEESignature() + public function testIEEESignature(): void { $key = '{"alg":"ES256","crv":"P-256","ext":true,"key_ops":["verify"],"kty":"EC","x":"FKwqyGd4i2NAl8RUXCCBRCAIbcpeGyfyXwgA_AWHb8Y","y":"njxhw5O6zGVkBlcPDKYj0E-6VO1giHTUkJWBhgKNqd8"}'; $key = PublicKeyLoader::load($key)->withSignatureFormat('IEEE')->withHash('sha384'); diff --git a/tests/Unit/Math/PrimeFieldTest.php b/tests/Unit/Math/PrimeFieldTest.php index 5ddfa757..bda14e84 100644 --- a/tests/Unit/Math/PrimeFieldTest.php +++ b/tests/Unit/Math/PrimeFieldTest.php @@ -23,7 +23,7 @@ class PrimeFieldTest extends PhpseclibTestCase $num2->squareRoot(); } - public function testPrimeFieldWithPrimeNumbers() + public function testPrimeFieldWithPrimeNumbers(): void { $a = new BigInteger('65', 10); $p = new BigInteger('127', 10);