@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | $db = file_get_contents(getenv("HOME").'/'.self::DIRECTORY.'/'.self::DB); |
| 64 | - $jsonDb = json_decode($db,true); |
|
| 64 | + $jsonDb = json_decode($db, true); |
|
| 65 | 65 | |
| 66 | 66 | if (is_null($jsonDb)) { |
| 67 | 67 | $output->writeln(''); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | $final = self::STAGING; |
| 73 | 73 | foreach ($hieranchy as $k => $v) { |
| 74 | 74 | if ($v == $branchOfProject) { |
| 75 | - $merge = $hieranchy[$k-1]; |
|
| 75 | + $merge = $hieranchy[$k - 1]; |
|
| 76 | 76 | $final = $v; |
| 77 | 77 | } |
| 78 | 78 | } |
@@ -80,9 +80,9 @@ discard block |
||
| 80 | 80 | chdir($jsonDb[$nameOfProject]); |
| 81 | 81 | |
| 82 | 82 | $pipetask = [ |
| 83 | - 'git checkout ' .$merge, |
|
| 83 | + 'git checkout '.$merge, |
|
| 84 | 84 | 'git pull', |
| 85 | - 'git checkout ' .$final, |
|
| 85 | + 'git checkout '.$final, |
|
| 86 | 86 | 'git merge '.$merge, |
| 87 | 87 | 'git push --progress 2>&1', |
| 88 | 88 | 'git checkout develop', |
@@ -98,8 +98,8 @@ discard block |
||
| 98 | 98 | $table->setHeaders(array('<fg=white>Command</>', '<fg=white>Result</>')); |
| 99 | 99 | |
| 100 | 100 | $exitCode = 0; |
| 101 | - foreach ($pipetask as $t){ |
|
| 102 | - if ($exitCode == 0){ |
|
| 101 | + foreach ($pipetask as $t) { |
|
| 102 | + if ($exitCode == 0) { |
|
| 103 | 103 | $command = new \mikehaertl\shellcommand\Command($t); |
| 104 | 104 | if ($command->execute()) { |
| 105 | 105 | $message = $command->getOutput(); |
@@ -119,16 +119,16 @@ discard block |
||
| 119 | 119 | $exitCode = -1; |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | - if ($exitCode == 0){ |
|
| 122 | + if ($exitCode == 0) { |
|
| 123 | 123 | $exitCodeMessage = '<fg=green>SUCCESS</>'; |
| 124 | - } elseif ($exitCode == 1){ |
|
| 124 | + } elseif ($exitCode == 1) { |
|
| 125 | 125 | $exitCodeMessage = '<fg=red>FAILED</>'; |
| 126 | - } elseif ($exitCode == -1){ |
|
| 126 | + } elseif ($exitCode == -1) { |
|
| 127 | 127 | $exitCodeMessage = '<fg=blue>ABORTED</>'; |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | $command = '<fg=magenta>'.$t.'</>'; |
| 131 | - if (strlen(trim($message))>0){ |
|
| 131 | + if (strlen(trim($message)) > 0) { |
|
| 132 | 132 | $command .= $command."\n".$message; |
| 133 | 133 | } |
| 134 | 134 | $table->addRow([$command, $exitCodeMessage]); |