| @@ -10,14 +10,15 @@ | ||
| 10 | 10 | private $command; |
| 11 | 11 | private $cwd; |
| 12 | 12 | |
| 13 | 13 | private function __construct() {} |
| 14 | - | |
| 14 | + | |
| 15 | 15 | /** |
| 16 | - * @param string $command Command to execute. | |
| 17 | - * @param string $cwd Directory to execute the command in. | |
| 18 | - */ | |
| 19 | - public static function create( $command, $cwd = null ) { | |
| 16 | + * @param string $command Command to execute. | |
| 17 | + * @param string $cwd Directory to execute the command in. | |
| 18 | + * @return SM_CLI_Process | |
| 19 | + */ | |
| 20 | + public static function create( $command, $cwd = ABSPATH ) { | |
| 20 | 21 | $proc = new self; |
| 21 | 22 | |
| 22 | 23 | $proc->command = $command; |
| 23 | 24 | $proc->cwd = $cwd; |
| @@ -24,13 +25,13 @@ | ||
| 24 | 25 | |
| 25 | 26 | return $proc; |
| 26 | 27 | } |
| 27 | 28 | |
| 28 | - /** | |
| 29 | - * Run the command. | |
| 30 | - * | |
| 31 | - * @return ProcessRun | |
| 32 | - */ | |
| 29 | + /** | |
| 30 | + * Run the command. | |
| 31 | + * | |
| 32 | + * @return SM_CLI_ProcessRun | |
| 33 | + */ | |
| 33 | 34 | public function run() { |
| 34 | 35 | $cwd = $this->cwd; |
| 35 | 36 | |
| 36 | 37 | $descriptors = array( |
| @@ -58,9 +59,9 @@ | ||
| 58 | 59 | |
| 59 | 60 | /** |
| 60 | 61 | * Run the command, but throw an Exception on error. |
| 61 | 62 | * |
| 62 | - * @return ProcessRun | |
| 63 | + * @return SM_CLI_ProcessRun | |
| 63 | 64 | */ |
| 64 | 65 | public function run_check() { |
| 65 | 66 | $r = $this->run(); |
| 66 | 67 | |