Total Complexity | 4 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class AddUpgradeStarterBranch extends Task |
||
13 | { |
||
14 | protected $taskStep = 's10'; |
||
15 | |||
16 | public function getTitle() |
||
17 | { |
||
18 | return 'Creates a start branch for upgrading'; |
||
19 | } |
||
20 | |||
21 | public function getDescription() |
||
26 | If it does not exist. |
||
27 | These branch names can be customised with setNameOfUpgradeStarterBranch and setNameOfBranchForBaseCode. |
||
28 | '; |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @param array $params not currently used for this task |
||
33 | */ |
||
34 | public function runActualTask($params = []): ?string |
||
35 | { |
||
36 | Git::inst($this->mu())->createNewBranchIfItDoesNotExist( |
||
37 | $this->mu()->getGitRootDir(), |
||
38 | $this->mu()->getNameOfUpgradeStarterBranch(), |
||
39 | $this->mu()->getNameOfBranchForBaseCode() |
||
40 | ); |
||
41 | return null; |
||
42 | } |
||
43 | |||
44 | protected function hasCommitAndPush() |
||
47 | } |
||
48 | } |
||
49 |