@@ -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 |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $content = file_get_contents("./newdep.phar"); |
14 | 14 | file_put_contents("dep.phar", $content); |
15 | 15 | unlink('./newdep.phar'); |
16 | - } catch (\Exception $e){ |
|
16 | + } catch (\Exception $e) { |
|
17 | 17 | return false; |
18 | 18 | } |
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>'); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | $db = file_get_contents($_SERVER['HOME'].'/'.self::DIRECTORY.'/'.self::DB); |
62 | - $jsonDb = json_decode($db,true); |
|
62 | + $jsonDb = json_decode($db, true); |
|
63 | 63 | |
64 | 64 | if (is_null($jsonDb)) { |
65 | 65 | $output->writeln(''); |
@@ -70,14 +70,14 @@ discard block |
||
70 | 70 | $final = self::STAGING; |
71 | 71 | foreach ($hieranchy as $k => $v) { |
72 | 72 | if ($v == $branchOfProject) { |
73 | - $merge = $hieranchy[$k-1]; |
|
73 | + $merge = $hieranchy[$k - 1]; |
|
74 | 74 | $final = $v; |
75 | 75 | } |
76 | 76 | } |
77 | 77 | $task = 'cd '.$jsonDb[$nameOfProject]; |
78 | - $task .= ' && git checkout ' .$merge; |
|
78 | + $task .= ' && git checkout '.$merge; |
|
79 | 79 | $task .= ' && git pull'; |
80 | - $task .= ' && git checkout ' .$final; |
|
80 | + $task .= ' && git checkout '.$final; |
|
81 | 81 | $task .= ' && git merge '.$merge; |
82 | 82 | $task .= ' && git push'; |
83 | 83 | $task .= ' && git checkout develop'; |
@@ -40,10 +40,10 @@ |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | $db = file_get_contents($_SERVER['HOME'].'/'.self::DIRECTORY.'/'.self::DB); |
43 | - $jsonDb = json_decode($db,true); |
|
43 | + $jsonDb = json_decode($db, true); |
|
44 | 44 | if (is_null($jsonDb)) $jsonDb = array(); |
45 | 45 | |
46 | - if (array_key_exists($nameOfProject,$jsonDb)) { |
|
46 | + if (array_key_exists($nameOfProject, $jsonDb)) { |
|
47 | 47 | $question = new ConfirmationQuestion('<error>This project exist. Do you want override it?</error> <info>Y/n</info> ', false); |
48 | 48 | if (!$helper->ask($input, $output, $question)) { |
49 | 49 | return; |
@@ -41,7 +41,9 @@ |
||
41 | 41 | |
42 | 42 | $db = file_get_contents($_SERVER['HOME'].'/'.self::DIRECTORY.'/'.self::DB); |
43 | 43 | $jsonDb = json_decode($db,true); |
44 | - if (is_null($jsonDb)) $jsonDb = array(); |
|
44 | + if (is_null($jsonDb)) { |
|
45 | + $jsonDb = array(); |
|
46 | + } |
|
45 | 47 | |
46 | 48 | if (array_key_exists($nameOfProject,$jsonDb)) { |
47 | 49 | $question = new ConfirmationQuestion('<error>This project exist. Do you want override it?</error> <info>Y/n</info> ', false); |
@@ -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 |