Skip to content

Commit 2f16b2d

Browse files
committed
SFTP: provide SSH2 @method annotations for phpstan
1 parent ad881b9 commit 2f16b2d

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

src/Net/SFTP.php

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,60 @@
4343
* Pure-PHP implementation of SFTP.
4444
*
4545
* @package SFTP
46+
* @method static void setCryptoEngine(string $engine)
47+
* @method void sendIdentificationStringFirst()
48+
* @method void sendIdentificationStringLast()
49+
* @method void sendKEXINITFirst()
50+
* @method void sendKEXINITLast()
51+
* @method int|float getTimeout()
52+
* @method void setTimeout(int|float $timeout)
53+
* @method void setKeepAlive(int|float $interval)
54+
* @method string getStdError()
55+
* @method string|bool exec(string $command, callable ?$callback = null)
56+
* @method bool requestAgentForwarding()
57+
* @method string|bool|null read(string $expect = '', int $mode = SSH2::READ_SIMPLE)
58+
* @method void write(string $cmd)
59+
* @method bool startSubsystem(string $subsystem)
60+
* @method bool stopSubsystem()
61+
* @method void reset()
62+
* @method bool isTimeout()
63+
* @method void disconnect()
64+
* @method bool isConnected()
65+
* @method bool isAuthenticated()
66+
* @method bool ping()
67+
* @method void enableQuietMode()
68+
* @method void disableQuietMode()
69+
* @method bool isQuietModeEnabled()
70+
* @method void enablePTY()
71+
* @method void disablePTY()
72+
* @method bool isPTYEnabled()
73+
* @method array|false|string getLog()
74+
* @method string[] getErrors()
75+
* @method ?string getLastError()
76+
* @method string|false getServerIdentification()
77+
* @method mixed[] getServerAlgorithms()
78+
* @method static string[] getSupportedKEXAlgorithms()
79+
* @method static string[] getSupportedHostKeyAlgorithms()
80+
* @method static string[] getSupportedEncryptionAlgorithms()
81+
* @method static string[] getSupportedMACAlgorithms()
82+
* @method static string[] getSupportedCompressionAlgorithms()
83+
* @method mixed[] getAlgorithmsNegotiated()
84+
* @method void setTerminal(string $term)
85+
* @method void setPreferredAlgorithms(mixed[] $methods)
86+
* @method string getBannerMessage()
87+
* @method string|false getServerPublicHostKey()
88+
* @method false|int getExitStatus()
89+
* @method int getWindowColumns()
90+
* @method int getWindowRows()
91+
* @method setWindowColumns(int $value)
92+
* @method setWindowRows(int $value)
93+
* @method setWindowSize(int $columns = 80, int $rows = 24)
94+
* @method string getResourceId()
95+
* @method static bool|SSH2 getConnectionByResourceId(string $id)
96+
* @method static array<string, SSH2> getConnections()
97+
* @method ?mixed[] getAuthMethodsToContinue()
98+
* @method void enableSmartMFA()
99+
* @method void disableSmartMFA()
46100
* @method void disableStatCache()
47101
* @method void enableStatCache()
48102
* @method void clearStatCache()

0 commit comments

Comments
 (0)