mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-09-28 15:19:02 +00:00
psalm ci
psalm-ci psalm-ci psalm-ci
This commit is contained in:
parent
ef66d9f7dd
commit
9b1c218664
@ -35,4 +35,5 @@ install:
|
||||
script:
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' ]; then vendor/bin/phing -f build/build.xml sniff; fi"
|
||||
- sh -c "if [ -d build/vendor ]; then build/vendor/bin/php-cs-fixer fix --config=build/php-cs-fixer.php --diff --dry-run; fi"
|
||||
- sh -c "if [ -d build/vendor ]; then build/vendor/bin/psalm --config="build/psalm.xml" --no-cache --long-progress --report-show-info=false --output-format=text; fi"
|
||||
- travis/run-phpunit.sh
|
||||
|
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "phpseclib/tools",
|
||||
"description": "",
|
||||
"name": "phpseclib/build",
|
||||
"description": "A separate composer.json file to house build related dependencies.",
|
||||
"minimum-stability": "stable",
|
||||
"license": "proprietary",
|
||||
"authors": [{"name": "Jack Worman", "email": "jworman@healthcall.com"}],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.1.0",
|
||||
"friendsofphp/php-cs-fixer": "^3.5"
|
||||
"friendsofphp/php-cs-fixer": "^3.5",
|
||||
"vimeo/psalm": "^4.19"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
|
@ -9,20 +9,17 @@
|
||||
sealAllMethods="true"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="phpseclib/Net"/>
|
||||
<directory name="../phpseclib/Net"/>
|
||||
</projectFiles>
|
||||
<fileExtensions>
|
||||
<extension name=".php"/>
|
||||
</fileExtensions>
|
||||
<issueHandlers>
|
||||
<Trace>
|
||||
<errorLevel type="error">
|
||||
<directory name="."/>
|
||||
<directory name=".."/>
|
||||
</errorLevel>
|
||||
</Trace>
|
||||
<UndefinedConstant>
|
||||
<errorLevel type="suppress">
|
||||
<directory name="phpseclib/Net"/>
|
||||
<directory name="../phpseclib/Net"/>
|
||||
</errorLevel>
|
||||
</UndefinedConstant>
|
||||
</issueHandlers>
|
@ -213,6 +213,9 @@ abstract class SymmetricKey
|
||||
self::ENGINE_OPENSSL_GCM => 'OpenSSL (GCM)'
|
||||
];
|
||||
|
||||
/** @var string|false */
|
||||
public $fixed;
|
||||
|
||||
/**
|
||||
* The Encryption Mode
|
||||
*
|
||||
|
@ -404,7 +404,7 @@ class SSH2
|
||||
* Server to Client Encryption Object
|
||||
*
|
||||
* @see self::_get_binary_packet()
|
||||
* @var object
|
||||
* @var SymmetricKey|false
|
||||
* @access private
|
||||
*/
|
||||
private $decrypt = false;
|
||||
@ -440,7 +440,7 @@ class SSH2
|
||||
* Client to Server Encryption Object
|
||||
*
|
||||
* @see self::_send_binary_packet()
|
||||
* @var object
|
||||
* @var SymmetricKey|false
|
||||
* @access private
|
||||
*/
|
||||
private $encrypt = false;
|
||||
@ -3457,6 +3457,11 @@ class SSH2
|
||||
$remaining_length = 0;
|
||||
break;
|
||||
case 'chacha20-poly1305@openssh.com':
|
||||
// This should be impossible, but we are checking anyway to narrow the type for Psalm.
|
||||
if (!($this->decrypt instanceof ChaCha20)) {
|
||||
throw new \LogicException('$this->decrypt is not a ' . ChaCha20::class);
|
||||
}
|
||||
|
||||
$nonce = pack('N2', 0, $this->get_seq_no);
|
||||
|
||||
$this->lengthDecrypt->setNonce($nonce);
|
||||
@ -4204,6 +4209,11 @@ class SSH2
|
||||
$packet = $temp . $this->encrypt->encrypt(substr($packet, 4));
|
||||
break;
|
||||
case 'chacha20-poly1305@openssh.com':
|
||||
// This should be impossible, but we are checking anyway to narrow the type for Psalm.
|
||||
if (!($this->encrypt instanceof ChaCha20)) {
|
||||
throw new \LogicException('$this->encrypt is not a ' . ChaCha20::class);
|
||||
}
|
||||
|
||||
$nonce = pack('N2', 0, $this->send_seq_no);
|
||||
|
||||
$this->encrypt->setNonce($nonce);
|
||||
@ -5154,6 +5164,7 @@ class SSH2
|
||||
* @return string
|
||||
* @access public
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function __toString()
|
||||
{
|
||||
return $this->getResourceId();
|
||||
|
Loading…
Reference in New Issue
Block a user