diff --git a/phpseclib/Crypt/DH.php b/phpseclib/Crypt/DH.php index 0cf0c428..9375ad33 100644 --- a/phpseclib/Crypt/DH.php +++ b/phpseclib/Crypt/DH.php @@ -243,7 +243,6 @@ abstract class DH extends AsymmetricKey * $length is in bits * * @param int $length optional - * @return DH\PrivateKey */ public static function createKey(Parameters $params, int $length = 0): PrivateKey { diff --git a/phpseclib/Crypt/DSA.php b/phpseclib/Crypt/DSA.php index a5974718..2175e440 100644 --- a/phpseclib/Crypt/DSA.php +++ b/phpseclib/Crypt/DSA.php @@ -180,7 +180,6 @@ abstract class DSA extends AsymmetricKey * Returns the private key, from which the publickey can be extracted * * @param int[] ...$args - * @return DSA\PrivateKey */ public static function createKey(...$args): PrivateKey { diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 328818c6..58dcd511 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -31,8 +31,8 @@ namespace phpseclib3\Math; use phpseclib3\Exception\BadConfigurationException; use phpseclib3\Exception\InvalidArgumentException; +use phpseclib3\Exception\UnexpectedValueException; use phpseclib3\Math\BigInteger\Engines\Engine; -use UnexpectedValueException; /** * Pure-PHP arbitrary precision integer arithmetic library. Supports base-2, base-10, base-16, and base-256 diff --git a/phpseclib/bootstrap.php b/phpseclib/bootstrap.php index 517106c3..7aededc9 100644 --- a/phpseclib/bootstrap.php +++ b/phpseclib/bootstrap.php @@ -1,5 +1,7 @@ put('test.txt', 'zzzzz'); - $sftp->get('test.txt', function ($data) { + $sftp->get('test.txt', function ($data): void { }, 0, 1); $this->assertTrue(true); + + return $sftp; } } diff --git a/tests/Unit/File/X509/X509Test.php b/tests/Unit/File/X509/X509Test.php index 162422fc..d42f9619 100644 --- a/tests/Unit/File/X509/X509Test.php +++ b/tests/Unit/File/X509/X509Test.php @@ -1293,7 +1293,7 @@ BbNA6tFZAwLoX18R6yEmzHAQ+R2Eliiaz7mgQ+M2d0ec6qQJFoO7aJsX $this->assertIsArray($r); } - public function testWildcardCert() + public function testWildcardCert(): void { $cert = '-----BEGIN CERTIFICATE----- MIIKqDCCCZCgAwIBAgIQAZ3dCTUFVNcaZ4TM/m6DFTANBgkqhkiG9w0BAQsFADBY @@ -1365,7 +1365,7 @@ dzXhMVAQYlpu27381/Ts2SuDx6v/cZ8lV8D5o/xTtCpWAnLxM2bxSyVnYbk= /** * @group github1943 */ - public function testWeirdCharsCert() + public function testWeirdCharsCert(): void { $cert = '-----BEGIN CERTIFICATE----- MIIDtTCCAp2gAwIBAgICECEwDQYJKoZIhvcNAQELBQAwYzELMAkGA1UEBhMCVVMx diff --git a/tests/Unit/Math/PrimeFieldTest.php b/tests/Unit/Math/PrimeFieldTest.php index 470ce815..19dbbe03 100644 --- a/tests/Unit/Math/PrimeFieldTest.php +++ b/tests/Unit/Math/PrimeFieldTest.php @@ -26,7 +26,7 @@ class PrimeFieldTest extends PhpseclibTestCase /** * @group github1929 */ - public function testGarbageCollectedToBytes() + public function testGarbageCollectedToBytes(): void { $blob = base64_decode('BFgsTFQeqKr0toyURbtT43INMDS7FTHjz3yn3MR1/Yv/pb2b9ZCYNQ/Tafe5hQpEJ4TpZOKfikP/hWZvFL8QCPgqbIGqw/KTfA=='); $public = "\0" . substr($blob, 0, 49);