Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public function __invoke(string $name, InputInterface $input, OutputInterface $output) |
||
24 | { |
||
25 | $output->writeln('<info># New git commit [' . $this->commitMessage . ']...</info>'); |
||
26 | |||
27 | $directory = getcwd() . '/' . $name; |
||
28 | |||
29 | $commands = [ |
||
30 | 'git add .', |
||
31 | 'git commit -m "' . $this->commitMessage . '"', |
||
32 | ]; |
||
33 | |||
34 | $runner = new CommandRunner($output, $directory); |
||
35 | $isSuccessful = $runner->run($commands); |
||
36 | |||
37 | if ($isSuccessful) { |
||
38 | $output->writeln('<comment>Successully committed.</comment>'); |
||
39 | } |
||
42 |