Completed
Push — master ( d342b9...3a6611 )
by Kamil
03:10
created
example/sftp_async_write.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 $ssh2->on('connect', function(SSH2Interface $ssh2) {
60 60
     echo "# CONNECTED\n";
61 61
     $ssh2->createDriver(SSH2::DRIVER_SFTP)
62
-         ->connect();
62
+            ->connect();
63 63
 });
64 64
 
65 65
 $ssh2->on('disconnect', function(SSH2Interface $ssh2) use($loop) {
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,8 @@
 block discarded – undo
37 37
     $file->write();
38 38
     $file->on('drain', function(SSH2ResourceInterface $file) use(&$lines, &$linesPointer) {
39 39
         echo "# PART OF THE DATA HAS BEEN WRITTEN\n";
40
-        if ($linesPointer < count($lines)) {
40
+        if ($linesPointer < count($lines))
41
+        {
41 42
             $file->write($lines[$linesPointer++]);
42 43
         }
43 44
     });
Please login to merge, or discard this patch.
example/ssh_async_multi_command.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 $ssh2->on('connect', function(SSH2Interface $ssh2) {
68 68
     echo "# CONNECTED\n";
69 69
     $ssh2->createDriver(SSH2::DRIVER_SHELL)
70
-         ->connect();
70
+            ->connect();
71 71
 });
72 72
 
73 73
 $ssh2->on('disconnect', function(SSH2Interface $ssh2) use($loop) {
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,8 @@  discard block
 block discarded – undo
19 19
 use Dazzle\SSH\SSH2Interface;
20 20
 use Dazzle\SSH\SSH2ResourceInterface;
21 21
 
22
-function executeCommand(SSH2DriverInterface $shell, $shellCommand) {
22
+function executeCommand(SSH2DriverInterface $shell, $shellCommand)
23
+{
23 24
 
24 25
     $buffer = '';
25 26
     $command = $shell->open();
@@ -49,12 +50,14 @@  discard block
 block discarded – undo
49 50
     $commandsRemain = count($commands);
50 51
 
51 52
     $shell->on('resource:close', function(SSH2DriverInterface $shell) use(&$commandsRemain) {
52
-        if (--$commandsRemain === 0) {
53
+        if (--$commandsRemain === 0)
54
+        {
53 55
             $shell->disconnect();
54 56
         }
55 57
     });
56 58
 
57
-    foreach ($commands as $command) {
59
+    foreach ($commands as $command)
60
+    {
58 61
         executeCommand($shell, $command);
59 62
     }
60 63
 });
Please login to merge, or discard this patch.
example/ssh_async_single_command.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 $ssh2->on('connect', function(SSH2Interface $ssh2) {
68 68
     echo "# CONNECTED\n";
69 69
     $ssh2->createDriver(SSH2::DRIVER_SHELL)
70
-         ->connect();
70
+            ->connect();
71 71
 });
72 72
 
73 73
 $ssh2->on('disconnect', function(SSH2Interface $ssh2) use($loop) {
Please login to merge, or discard this patch.
example/sftp_async_read.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 $ssh2->on('connect', function(SSH2Interface $ssh2) {
60 60
     echo "# CONNECTED\n";
61 61
     $ssh2->createDriver(SSH2::DRIVER_SFTP)
62
-         ->connect();
62
+            ->connect();
63 63
 });
64 64
 
65 65
 $ssh2->on('disconnect', function(SSH2Interface $ssh2) use($loop) {
Please login to merge, or discard this patch.