mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-24 11:05:30 +00:00
style: fix cs and type in SSH2::get_stream_timeout()
This commit is contained in:
parent
cdd87934cc
commit
6b960902a0
@ -3,7 +3,10 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
return (new PhpCsFixer\Config())
|
||||
->setFinder(PhpCsFixer\Finder::create()->in(__DIR__ . '/..'))
|
||||
->setFinder(PhpCsFixer\Finder::create()
|
||||
->in(__DIR__ . '/..')
|
||||
// https://github.com/phpseclib/phpseclib/pull/2016#discussion_r1691282898
|
||||
->notPath('phpseclib/Crypt/Blowfish.php'))
|
||||
->setCacheFile(__DIR__ . '/php-cs-fixer.cache')
|
||||
->setRiskyAllowed(true)
|
||||
// https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/doc/rules/index.rst
|
||||
|
@ -3134,7 +3134,7 @@ class SSH2
|
||||
*/
|
||||
private function get_stream_timeout()
|
||||
{
|
||||
$sec = ini_get('default_socket_timeout');
|
||||
$sec = (int) ini_get('default_socket_timeout');
|
||||
$usec = 0;
|
||||
if ($this->curTimeout > 0) {
|
||||
$sec = (int) floor($this->curTimeout);
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/** @var iterable<SplFileInfo> $files */
|
||||
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__));
|
||||
foreach ($files as $file) {
|
||||
@ -17,7 +19,7 @@ foreach ($files as $file) {
|
||||
'~ function assertIsObject\(\$actual, \$message = \'\'\)~' => ' function _assertIsObject($actual, string $message = \'\')',
|
||||
'~ function assertIsString\(\$actual, \$message = \'\'\)~' => ' function _assertIsString($actual, string $message = \'\')',
|
||||
'~ function assertStringContainsString\(\$needle, \$haystack, \$message = \'\'\)~' => ' function _assertStringContainsString(string $needle, string $haystack, string $message = \'\')',
|
||||
'~ function assertStringNotContainsString\(\$needle, \$haystack, \$message = \'\'\)~' => ' function _assertStringNotContainsString(string $needle, string $haystack, string $message = \'\')'
|
||||
'~ function assertStringNotContainsString\(\$needle, \$haystack, \$message = \'\'\)~' => ' function _assertStringNotContainsString(string $needle, string $haystack, string $message = \'\')',
|
||||
];
|
||||
$updatedFileContents = preg_replace(
|
||||
array_keys($patternToReplacementMap),
|
||||
|
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/** @var iterable<SplFileInfo> $files */
|
||||
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__));
|
||||
foreach ($files as $file) {
|
||||
|
Loading…
Reference in New Issue
Block a user