Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php namespace Packedge\Workbench\Tools; |
||
66 | protected function execute($command) |
||
67 | { |
||
68 | $cwd = getcwd(); |
||
69 | chdir($this->repositoryPath); |
||
70 | exec($command, $output, $returnValue); |
||
71 | chdir($cwd); |
||
72 | if ($returnValue !== 0) { |
||
73 | throw new RuntimeException($output); |
||
74 | } |
||
75 | return $output; |
||
76 | } |
||
77 | } |