@@ -91,15 +91,15 @@ |
||
| 91 | 91 | * @param instance $terminal Terminal instance |
| 92 | 92 | * @return object |
| 93 | 93 | */ |
| 94 | - final public function write($command, $returncode = FALSE) |
|
| 94 | + final public function write($command, $returncode = false) |
|
| 95 | 95 | { |
| 96 | - $command = ($returncode == FALSE) ? $command : $command.'; echo "RETURN_CODE:[$?]";'; |
|
| 96 | + $command = ($returncode == false) ? $command : $command.'; echo "RETURN_CODE:[$?]";'; |
|
| 97 | 97 | $write_count = 0; |
| 98 | 98 | $string_len = strlen($command.PHP_EOL); |
| 99 | 99 | while ($write_count < $string_len) |
| 100 | 100 | { |
| 101 | 101 | $fwrite_count = fwrite($this->stream, substr($command.PHP_EOL, $write_count), 1024); |
| 102 | - if ($fwrite_count === FALSE) |
|
| 102 | + if ($fwrite_count === false) |
|
| 103 | 103 | { |
| 104 | 104 | throw new \RuntimeException('failed to write command to stream'); |
| 105 | 105 | } |
@@ -49,14 +49,14 @@ |
||
| 49 | 49 | */ |
| 50 | 50 | final public function copy($srcfile, $destfile) |
| 51 | 51 | { |
| 52 | - if ($this->is_file($srcfile) === FALSE) |
|
| 52 | + if ($this->is_file($srcfile) === false) |
|
| 53 | 53 | { |
| 54 | 54 | $this->set_error('Local file '.$srcfile.' does not exist.'); |
| 55 | 55 | $this->set_exitstatus(1); |
| 56 | 56 | return; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - if (@copy($this->sftp_url($srcfile), $this->sftp_url($destfile)) === FALSE) |
|
| 59 | + if (@copy($this->sftp_url($srcfile), $this->sftp_url($destfile)) === false) |
|
| 60 | 60 | { |
| 61 | 61 | $this->set_error($this->get_error_message()); |
| 62 | 62 | $this->set_exitstatus(1); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | { |
| 71 | 71 | if (preg_match('/^-.*$/', $key, $matches)) |
| 72 | 72 | { |
| 73 | - $options[] = is_bool($value) ? $key : str_pad($key, strlen($key) + 1, ' ', STR_PAD_RIGHT) . $value; |
|
| 73 | + $options[] = is_bool($value) ? $key : str_pad($key, strlen($key) + 1, ' ', STR_PAD_RIGHT).$value; |
|
| 74 | 74 | } |
| 75 | 75 | if (preg_match('/^-.*$/', $value, $matches)) |
| 76 | 76 | { |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | { |
| 95 | 95 | if (preg_match('/^-.*$/', $key, $matches)) |
| 96 | 96 | { |
| 97 | - $arguments[] = is_bool($value) ? $key : str_pad($key, strlen($key) + 1, ' ', STR_PAD_RIGHT) . $value; |
|
| 97 | + $arguments[] = is_bool($value) ? $key : str_pad($key, strlen($key) + 1, ' ', STR_PAD_RIGHT).$value; |
|
| 98 | 98 | } |
| 99 | 99 | else |
| 100 | 100 | { |
@@ -95,8 +95,7 @@ |
||
| 95 | 95 | if (preg_match('/^-.*$/', $key, $matches)) |
| 96 | 96 | { |
| 97 | 97 | $arguments[] = is_bool($value) ? $key : str_pad($key, strlen($key) + 1, ' ', STR_PAD_RIGHT) . $value; |
| 98 | - } |
|
| 99 | - else |
|
| 98 | + } else |
|
| 100 | 99 | { |
| 101 | 100 | $arguments[] = is_array($value) ? implode(' ', $value) : $value; |
| 102 | 101 | } |