Completed
Push — master ( f0bd91...8bcd04 )
by Anton
02:41
created
src/Rsync.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -601,7 +601,7 @@
 block discarded – undo
601 601
         parent::__construct($this->config[self::CONF_EXECUTABLE], $this->config[self::CONF_CWD], '=');
602 602
     }
603 603
 
604
-    public function getSSH() :?SSH {
604
+    public function getSSH() : ?SSH {
605 605
         return $this->config[self::CONF_SSH];
606 606
     }
607 607
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -628,14 +628,11 @@
 block discarded – undo
628 628
     public function setSSH($ssh) :self {
629 629
         if ($ssh instanceof SSH) {
630 630
             $this->config[self::CONF_SSH] = $ssh;
631
-        }
632
-        else if (is_array($ssh)) {
631
+        } else if (is_array($ssh)) {
633 632
             $this->config[self::CONF_SSH] = new SSH($ssh);
634
-        }
635
-        else if ($ssh === null) {
633
+        } else if ($ssh === null) {
636 634
             $this->config[self::CONF_SSH] = null;
637
-        }
638
-        else {
635
+        } else {
639 636
             throw new Exception\Command('ssh config has to be an instance of \xobotyi\rsync\SSH, array or null, got ' . gettype($ssh));
640 637
         }
641 638
 
Please login to merge, or discard this patch.
src/Command.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -369,8 +369,7 @@
 block discarded – undo
369 369
         if (is_bool($val)) {
370 370
             if ($val) {
371 371
                 $this->options[$optName] = $val;
372
-            }
373
-            else {
372
+            } else {
374 373
                 unset($this->options[$optName]);
375 374
             }
376 375
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -106,13 +106,13 @@  discard block
 block discarded – undo
106 106
      * @throws \xobotyi\rsync\Exception\Command
107 107
      */
108 108
     public function execute() :self {
109
-        $this->exitCode = 1;    // exit 0 on ok
110
-        $this->stdout   = '';   // output of the command
111
-        $this->stderr   = '';   // errors during execution
109
+        $this->exitCode = 1; // exit 0 on ok
110
+        $this->stdout   = ''; // output of the command
111
+        $this->stderr   = ''; // errors during execution
112 112
 
113 113
         $descriptor = [
114
-            0 => ["pipe", "r"],    // stdin is a pipe that the child will read from
115
-            1 => ["pipe", "w"],    // stdout is a pipe that the child will write to
114
+            0 => ["pipe", "r"], // stdin is a pipe that the child will read from
115
+            1 => ["pipe", "w"], // stdout is a pipe that the child will write to
116 116
             2 => ["pipe", "w"]     // stderr is a pipe
117 117
         ];
118 118
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     /**
183 183
      * @return string|null
184 184
      */
185
-    public function getExitCode() :?string {
185
+    public function getExitCode() : ?string {
186 186
         return $this->exitCode;
187 187
     }
188 188
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
     /**
314 314
      * @return string|null
315 315
      */
316
-    public function getStderr() :?string {
316
+    public function getStderr() : ?string {
317 317
 
318 318
         return $this->stderr;
319 319
     }
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     /**
322 322
      * @return string|null
323 323
      */
324
-    public function getStdout() :?string {
324
+    public function getStdout() : ?string {
325 325
         return $this->stdout;
326 326
     }
327 327
 
Please login to merge, or discard this patch.