@@ -34,7 +34,7 @@ |
||
| 34 | 34 | parent::__construct($configuration, $authentication); |
| 35 | 35 | |
| 36 | 36 | $this->sftp = @ssh2_sftp($this->connection); |
| 37 | - if(!$this->sftp) |
|
| 37 | + if (!$this->sftp) |
|
| 38 | 38 | { |
| 39 | 39 | throw new \RuntimeException($this->get_error_message()); |
| 40 | 40 | } |
@@ -256,7 +256,7 @@ |
||
| 256 | 256 | { |
| 257 | 257 | $directories = !is_array($directories) ? [$directories] : $directories; |
| 258 | 258 | foreach ($directories as $directory) |
| 259 | - { |
|
| 259 | + { |
|
| 260 | 260 | if ($this->is_dir($directory)) |
| 261 | 261 | { |
| 262 | 262 | start: |
@@ -218,7 +218,7 @@ |
||
| 218 | 218 | final private function exec_realtime($stream) |
| 219 | 219 | { |
| 220 | 220 | while ($buffer = fgets($stream)) |
| 221 | - { |
|
| 221 | + { |
|
| 222 | 222 | if (!preg_match('/RETURN_CODE:\[([0-9]+)\]/', $buffer, $retval)) |
| 223 | 223 | { |
| 224 | 224 | print $buffer; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | { |
| 68 | 68 | $this->options = []; |
| 69 | 69 | foreach ($opts as $key => $value) |
| 70 | - { |
|
| 70 | + { |
|
| 71 | 71 | if (preg_match('/^-.*$/', $key, $matches)) |
| 72 | 72 | { |
| 73 | 73 | $this->options[] = is_bool($value) ? $key : str_pad($key, strlen($key) + 1, ' ', STR_PAD_RIGHT) . $value; |
@@ -91,12 +91,11 @@ discard block |
||
| 91 | 91 | { |
| 92 | 92 | $this->arguments = []; |
| 93 | 93 | foreach ($args as $key => $value) |
| 94 | - { |
|
| 94 | + { |
|
| 95 | 95 | if (preg_match('/^-.*$/', $key, $matches)) |
| 96 | 96 | { |
| 97 | 97 | $this->arguments[] = is_bool($value) ? $key : str_pad($key, strlen($key) + 1, ' ', STR_PAD_RIGHT) . $value; |
| 98 | - } |
|
| 99 | - else |
|
| 98 | + } else |
|
| 100 | 99 | { |
| 101 | 100 | $this->arguments[] = is_array($value) ? implode(' ', $value) : $value; |
| 102 | 101 | } |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | $error = $ssh->get_error(); |
| 143 | 143 | $retval = $ssh->get_exitstatus(); |
| 144 | 144 | |
| 145 | - if ($strict && $retval != 0 ) |
|
| 145 | + if ($strict && $retval != 0) |
|
| 146 | 146 | { |
| 147 | 147 | throw new \RuntimeException($error); |
| 148 | 148 | } |