| @@ -13,7 +13,7 @@ | ||
| 13 | 13 | curl_setopt($ch, CURLOPT_URL, self::URL); | 
| 14 | 14 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | 
| 15 | 15 | curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); | 
| 16 | - curl_setopt($ch,CURLOPT_USERAGENT,'Awesome-Octocat-App'); | |
| 16 | + curl_setopt($ch, CURLOPT_USERAGENT, 'Awesome-Octocat-App'); | |
| 17 | 17 | $data = curl_exec($ch); | 
| 18 | 18 | curl_close($ch); | 
| 19 | 19 | |
| @@ -51,7 +51,7 @@ | ||
| 51 | 51 | return; | 
| 52 | 52 | } | 
| 53 | 53 | |
| 54 | -            if ($this->downloadService->download($this->gitHubService->latestBrowserDownloadUrl())){ | |
| 54 | +            if ($this->downloadService->download($this->gitHubService->latestBrowserDownloadUrl())) { | |
| 55 | 55 |                  $output->writeln('<info> '.SelfUpdateCommandText::OK_INSTALLED.'</info>'); | 
| 56 | 56 |              } else { | 
| 57 | 57 |                  $output->writeln('<info> '.SelfUpdateCommandText::KO_INSTALLED.'</info>'); | 
| @@ -42,7 +42,7 @@ discard block | ||
| 42 | 42 | |
| 43 | 43 | public function getHelp() | 
| 44 | 44 |      { | 
| 45 | - return self::$logo . parent::getHelp(); | |
| 45 | + return self::$logo.parent::getHelp(); | |
| 46 | 46 | } | 
| 47 | 47 | |
| 48 | 48 | public function getLongVersion() | 
| @@ -55,7 +55,7 @@ discard block | ||
| 55 | 55 | $message .= "\n <bg=yellow;fg=black;options=bold>".self::MESSAGE_UPDATE." ".SelfUpdateCommand::COMMAND_NAME." to install.</>\n"; | 
| 56 | 56 | } | 
| 57 | 57 | |
| 58 | - $message .="\n <info>".self::MESSAGE_NAME." </info>".$actualVersion; | |
| 58 | + $message .= "\n <info>".self::MESSAGE_NAME." </info>".$actualVersion; | |
| 59 | 59 | |
| 60 | 60 | return $message; | 
| 61 | 61 | } | 
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | -require __DIR__ . '/vendor/autoload.php'; | |
| 3 | +require __DIR__.'/vendor/autoload.php'; | |
| 4 | 4 | |
| 5 | 5 |  date_default_timezone_set('UTC'); | 
| 6 | 6 | |
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | -require __DIR__ . '/vendor/autoload.php'; | |
| 3 | +require __DIR__.'/vendor/autoload.php'; | |
| 4 | 4 | |
| 5 | 5 |  date_default_timezone_set('UTC'); | 
| 6 | 6 | |
| @@ -4,5 +4,5 @@ | ||
| 4 | 4 | |
| 5 | 5 | class ShowProjectsCommandText | 
| 6 | 6 |  { | 
| 7 | - const OK_0_PROJECTS = "0 projects configurated"; | |
| 7 | + const OK_0_PROJECTS = "0 projects configurated"; | |
| 8 | 8 | } | 
| 9 | 9 | \ No newline at end of file | 
| @@ -39,7 +39,7 @@ | ||
| 39 | 39 |          } else { | 
| 40 | 40 | $tableData = []; | 
| 41 | 41 |              foreach ($jsonDb as $k =>$v) { | 
| 42 | - $tableData[] = [$k,$v]; | |
| 42 | + $tableData[] = [$k, $v]; | |
| 43 | 43 | } | 
| 44 | 44 | |
| 45 | 45 | $table = new Table($output); | 
| @@ -15,8 +15,8 @@ | ||
| 15 | 15 | $content = file_get_contents($pathExec."/newdep"); | 
| 16 | 16 | file_put_contents($pathExec."/dep", $content); | 
| 17 | 17 | unlink($pathExec.'/newdep'); | 
| 18 | - chmod($pathExec."/dep",0755); | |
| 19 | -        } catch (\Exception $e){ | |
| 18 | + chmod($pathExec."/dep", 0755); | |
| 19 | +        } catch (\Exception $e) { | |
| 20 | 20 | return false; | 
| 21 | 21 | } | 
| 22 | 22 | |
| @@ -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]); |