@@ -62,7 +62,6 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * Sets path to working directory |
| 65 | - * @param string $workingTree |
|
| 66 | 65 | */ |
| 67 | 66 | public function setWorkingDirectory($workingDirectory) |
| 68 | 67 | { |
@@ -100,7 +99,7 @@ discard block |
||
| 100 | 99 | |
| 101 | 100 | /** |
| 102 | 101 | * Sets git command (to be executed later) |
| 103 | - * @param mixed $command |
|
| 102 | + * @param string $command |
|
| 104 | 103 | */ |
| 105 | 104 | public function setCommand($command) |
| 106 | 105 | { |
@@ -139,6 +138,9 @@ discard block |
||
| 139 | 138 | } |
| 140 | 139 | |
| 141 | 140 | |
| 141 | + /** |
|
| 142 | + * @param string $command |
|
| 143 | + */ |
|
| 142 | 144 | private function exec($command) |
| 143 | 145 | { |
| 144 | 146 | $exec = new Exec(); |
@@ -127,12 +127,12 @@ |
||
| 127 | 127 | public function execute() |
| 128 | 128 | { |
| 129 | 129 | $command = ''; |
| 130 | - if($this->workingDirectory !== NULL){ |
|
| 130 | + if ($this->workingDirectory !== NULL) { |
|
| 131 | 131 | $command .= 'cd ' . escapeshellarg($this->workingDirectory) . ' && '; |
| 132 | 132 | } |
| 133 | 133 | $command .= escapeshellarg($this->gitExecutable); |
| 134 | 134 | $execCommand = $command . ' ' . $this->command; |
| 135 | - if($this->redirectStderrToStdout){ |
|
| 135 | + if ($this->redirectStderrToStdout) { |
|
| 136 | 136 | $execCommand .= ' 2>&1'; |
| 137 | 137 | } |
| 138 | 138 | return $this->exec($execCommand); |