-
-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathOldGitRunner.php
More file actions
43 lines (32 loc) · 789 Bytes
/
OldGitRunner.php
File metadata and controls
43 lines (32 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace CzProject\GitPhp\Runners;
use CzProject\GitPhp\IRunner;
class OldGitRunner implements IRunner
{
/** @var IRunner */
private $runner;
public function __construct(IRunner $runner = NULL)
{
$this->runner = $runner !== NULL ? $runner : new CliRunner;
}
/**
* Add a configuration parameter to the command.
* @param string $name
* @param mixed $value
*/
public function addConfig($name, $value)
{
$this->runner->addConfig($name, $value);
}
public function run($cwd, array $args, array $env = NULL)
{
if (($key = array_search('--end-of-options', $args)) !== FALSE) {
unset($args[$key]);
}
return $this->runner->run($cwd, $args, $env);
}
public function getCwd()
{
return $this->runner->getCwd();
}
}