Completed
Push — master ( 0c8ca0...3171fc )
by juan
02:20
created
src/Juanber84/Console/Application.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Juanber84\Console;
4 4
 
5
-use Juanber84\Console\Command\BatchProcessCommand;
6 5
 use Juanber84\Console\Command\SelfUpdateCommand;
7 6
 use Juanber84\Services\ApplicationService;
8 7
 use Juanber84\Services\GitHubService;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Juanber84/Services/GitHubService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Juanber84/Services/DownloadService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Juanber84/Console/Command/ShowProjectsCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@
 block discarded – undo
25 25
     protected function execute(InputInterface $input, OutputInterface $output)
26 26
     {
27 27
         $db = file_get_contents($_SERVER['HOME'].'/'.self::DIRECTORY.'/'.self::DB);
28
-        $jsonDb = json_decode($db,true);
28
+        $jsonDb = json_decode($db, true);
29 29
         if (is_null($jsonDb) || count($jsonDb) == 0) {
30 30
             $output->writeln('');
31 31
             $output->writeln('<info>0 projects configurated</info>');
32 32
         } else {
33 33
             $tableData = [];
34 34
             foreach ($jsonDb as $k =>$v) {
35
-                $tableData[] = [$k,$v];
35
+                $tableData[] = [$k, $v];
36 36
             }
37 37
 
38 38
             $table = new Table($output);
Please login to merge, or discard this patch.
src/Juanber84/Console/Command/SelfUpdateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
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>');
Please login to merge, or discard this patch.
src/Juanber84/Console/Command/DeployProjectsCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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';
Please login to merge, or discard this patch.
src/Juanber84/Console/Command/RemoveProjectsCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         } while (empty($nameOfProject));
38 38
 
39 39
         $db = file_get_contents($_SERVER['HOME'].'/'.self::DIRECTORY.'/'.self::DB);
40
-        $jsonDb = json_decode($db,true);
40
+        $jsonDb = json_decode($db, true);
41 41
 
42 42
         if (is_null($jsonDb)) {
43 43
             $output->writeln('');
Please login to merge, or discard this patch.
src/Juanber84/Console/Command/AddProjectsCommand.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,10 +40,10 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,9 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
console.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.