Completed
Push — master ( 755b65...553351 )
by juan
02:20
created
src/Juanber84/Console/Command/DeployProjectsCommand.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                 $final = self::STAGING;
77 77
                 foreach ($hieranchy as $k => $v) {
78 78
                     if ($v == $branchOfProject) {
79
-                        $merge = $hieranchy[$k-1];
79
+                        $merge = $hieranchy[$k - 1];
80 80
                         $final = $v;
81 81
                     }
82 82
                 }
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
                 chdir($jsonDb[$nameOfProject]);
85 85
 
86 86
                 $pipetask = [
87
-                    'git checkout ' .$merge,
87
+                    'git checkout '.$merge,
88 88
                     'git pull',
89
-                    'git checkout ' .$final,
89
+                    'git checkout '.$final,
90 90
                     'git merge '.$merge,
91 91
                     'git push --progress 2>&1',
92 92
                     'git checkout develop',
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
 
103 103
                 $exitCode = 0;
104 104
                 $exitCodeMessage = "";
105
-                foreach ($pipetask as $t){
106
-                    if ($exitCode == 0){
105
+                foreach ($pipetask as $t) {
106
+                    if ($exitCode == 0) {
107 107
                         $command = new \mikehaertl\shellcommand\Command($t);
108 108
                         if ($command->execute()) {
109 109
                             $message = $command->getOutput();
@@ -125,16 +125,16 @@  discard block
 block discarded – undo
125 125
                         $exitCode = -1;
126 126
                     }
127 127
 
128
-                    if ($exitCode == 0){
128
+                    if ($exitCode == 0) {
129 129
                         $exitCodeMessage = '<fg=green>SUCCESS</>';
130
-                    } elseif ($exitCode == 1){
130
+                    } elseif ($exitCode == 1) {
131 131
                         $exitCodeMessage = '<fg=red>FAILED</>';
132
-                    } elseif ($exitCode == -1){
132
+                    } elseif ($exitCode == -1) {
133 133
                         $exitCodeMessage = '<fg=blue>ABORTED</>';
134 134
                     }
135 135
 
136 136
                     $command = '<fg=magenta>'.$t.'</>';
137
-                    if (strlen(trim($message))>0){
137
+                    if (strlen(trim($message)) > 0) {
138 138
                         $command .= "\n".$message;
139 139
                     }
140 140
                     $table->addRow([$command, $exitCodeMessage]);
Please login to merge, or discard this patch.