@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * @return string |
81 | 81 | */ |
82 | 82 | protected function getStubPath() { |
83 | - return __DIR__ . '/stubs/llumrc.stub'; |
|
83 | + return __DIR__.'/stubs/llumrc.stub'; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | public function init(InputInterface $input, OutputInterface $output) |
106 | 106 | { |
107 | 107 | try { |
108 | - $this->executeWizard($input,$output); |
|
108 | + $this->executeWizard($input, $output); |
|
109 | 109 | $this->filesytem->overwrite( |
110 | 110 | (new LlumRCFile())->path(), |
111 | 111 | $this->compiler->compile( |
@@ -122,10 +122,10 @@ discard block |
||
122 | 122 | * @param InputInterface $input |
123 | 123 | * @param OutputInterface $output |
124 | 124 | */ |
125 | - protected function executeWizard(InputInterface $input, OutputInterface $output){ |
|
125 | + protected function executeWizard(InputInterface $input, OutputInterface $output) { |
|
126 | 126 | |
127 | - $this->askGithubUsername($input,$output); |
|
128 | - $this->askGithubToken($input,$output); |
|
127 | + $this->askGithubUsername($input, $output); |
|
128 | + $this->askGithubToken($input, $output); |
|
129 | 129 | |
130 | 130 | $this->data = [ |
131 | 131 | "GITHUB_USERNAME" => $this->github_username, |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | public function askGithubUsername(InputInterface $input, OutputInterface $output) |
142 | 142 | { |
143 | 143 | $defaultusername = $this->defaultUsername(); |
144 | - $question = new Question('<info>Please enter your github username (' . $defaultusername . ') ? </info>', $defaultusername); |
|
144 | + $question = new Question('<info>Please enter your github username ('.$defaultusername.') ? </info>', $defaultusername); |
|
145 | 145 | $this->github_username = $this->getHelper('question')->ask($input, $output, $question); |
146 | 146 | } |
147 | 147 | |
@@ -161,9 +161,9 @@ discard block |
||
161 | 161 | { |
162 | 162 | $question = new ConfirmationQuestion('<info>Do you want to use our assistant to obtain token via Github API (Y/n)? </info>', true); |
163 | 163 | if ($this->getHelper('question')->ask($input, $output, $question)) { |
164 | - $this->github_token =$this->api->getPersonalToken( |
|
164 | + $this->github_token = $this->api->getPersonalToken( |
|
165 | 165 | $this->github_username, |
166 | - $this->askGithubPassword($input,$output)); |
|
166 | + $this->askGithubPassword($input, $output)); |
|
167 | 167 | } |
168 | 168 | } |
169 | 169 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | protected function showErrorRunLlumInitFirst(OutputInterface $output, $varname) |
22 | 22 | { |
23 | - $output->writeln('<error>' . $varname |
|
23 | + $output->writeln('<error>'.$varname |
|
24 | 24 | . ' not found in config file. Run git init before executing this command!</error>'); |
25 | 25 | die(); |
26 | 26 | } |
@@ -31,6 +31,6 @@ discard block |
||
31 | 31 | * @param OutputInterface $output |
32 | 32 | */ |
33 | 33 | protected function showMessageRunningCommand(OutputInterface $output, $commandName) { |
34 | - $output->writeln('<info>Running command ' . $commandName . '...</info>'); |
|
34 | + $output->writeln('<info>Running command '.$commandName.'...</info>'); |
|
35 | 35 | } |
36 | 36 | } |
37 | 37 | \ No newline at end of file |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $this->runGitAdd(); |
77 | 77 | $this->runGitCommit(); |
78 | 78 | $this->runGitCreateRepo(); |
79 | - $this->runGitRemoteAddOrigin($this->getRepoURL($input,$output)); |
|
79 | + $this->runGitRemoteAddOrigin($this->getRepoURL($input, $output)); |
|
80 | 80 | $this->runGitPull(); |
81 | 81 | $this->runGitPush(); |
82 | 82 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function getRepoURL(InputInterface $input, OutputInterface $output) |
93 | 93 | { |
94 | - return '[email protected]:' . $this->gitHubUsername($input,$output) . '/' . $this->repoName($input) . '.git'; |
|
94 | + return '[email protected]:'.$this->gitHubUsername($input, $output).'/'.$this->repoName($input).'.git'; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | { |
130 | 130 | $username = $this->parser->getGitHubUsername(); |
131 | 131 | if (is_null($username)) { |
132 | - $this->showErrorRunLlumInitFirst($output,'username'); |
|
132 | + $this->showErrorRunLlumInitFirst($output, 'username'); |
|
133 | 133 | } |
134 | 134 | return $username; |
135 | 135 | } |
@@ -137,24 +137,24 @@ discard block |
||
137 | 137 | /** |
138 | 138 | * Run git init command. |
139 | 139 | */ |
140 | - protected function runGitInit(){ |
|
141 | - $this->showMessageRunningCommand($this->output,'git init'); |
|
140 | + protected function runGitInit() { |
|
141 | + $this->showMessageRunningCommand($this->output, 'git init'); |
|
142 | 142 | passthru('git init'); |
143 | 143 | } |
144 | 144 | |
145 | 145 | /** |
146 | 146 | * Run git add command. |
147 | 147 | */ |
148 | - protected function runGitAdd(){ |
|
149 | - $this->showMessageRunningCommand($this->output,'git add .'); |
|
148 | + protected function runGitAdd() { |
|
149 | + $this->showMessageRunningCommand($this->output, 'git add .'); |
|
150 | 150 | passthru('git add .'); |
151 | 151 | } |
152 | 152 | |
153 | 153 | /** |
154 | 154 | * Run git commit command. |
155 | 155 | */ |
156 | - protected function runGitCommit(){ |
|
157 | - $this->showMessageRunningCommand($this->output,'git commit -a -m "Initial version"'); |
|
156 | + protected function runGitCommit() { |
|
157 | + $this->showMessageRunningCommand($this->output, 'git commit -a -m "Initial version"'); |
|
158 | 158 | passthru('git commit -a -m "Initial version"'); |
159 | 159 | } |
160 | 160 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | protected function runGitCreateRepo() |
165 | 165 | { |
166 | - $this->showMessageRunningCommand($this->output,'llum github:repo'); |
|
166 | + $this->showMessageRunningCommand($this->output, 'llum github:repo'); |
|
167 | 167 | passthru('../llum github:repo'); |
168 | 168 | } |
169 | 169 | |
@@ -172,24 +172,24 @@ discard block |
||
172 | 172 | * |
173 | 173 | * @param $url |
174 | 174 | */ |
175 | - protected function runGitRemoteAddOrigin($url){ |
|
176 | - $this->showMessageRunningCommand($this->output,'git remote add origin ' . $url); |
|
177 | - passthru('git remote add origin ' . $url); |
|
175 | + protected function runGitRemoteAddOrigin($url) { |
|
176 | + $this->showMessageRunningCommand($this->output, 'git remote add origin '.$url); |
|
177 | + passthru('git remote add origin '.$url); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | /** |
181 | 181 | * Run git pull. |
182 | 182 | */ |
183 | - protected function runGitPull(){ |
|
184 | - $this->showMessageRunningCommand($this->output,'git pull origin master'); |
|
183 | + protected function runGitPull() { |
|
184 | + $this->showMessageRunningCommand($this->output, 'git pull origin master'); |
|
185 | 185 | passthru('git pull origin master'); |
186 | 186 | } |
187 | 187 | |
188 | 188 | /** |
189 | 189 | * Run git push. |
190 | 190 | */ |
191 | - protected function runGitPush(){ |
|
192 | - $this->showMessageRunningCommand($this->output,'git push origin master'); |
|
191 | + protected function runGitPush() { |
|
192 | + $this->showMessageRunningCommand($this->output, 'git push origin master'); |
|
193 | 193 | passthru('git push origin master'); |
194 | 194 | } |
195 | 195 |
@@ -1,3 +1,3 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -define ("GITHUB_PASSWORD","bImhappyplatanito"); |
|
4 | 3 | \ No newline at end of file |
4 | +define("GITHUB_PASSWORD", "bImhappyplatanito"); |
|
5 | 5 | \ No newline at end of file |
@@ -16,7 +16,6 @@ discard block |
||
16 | 16 | /** |
17 | 17 | * Serve command. |
18 | 18 | * |
19 | - * @param int $port |
|
20 | 19 | */ |
21 | 20 | protected function serve(InputInterface $input, OutputInterface $output) |
22 | 21 | { |
@@ -75,7 +74,7 @@ discard block |
||
75 | 74 | * Obtain port. |
76 | 75 | * |
77 | 76 | * @param InputInterface $input |
78 | - * @return mixed|string |
|
77 | + * @return integer |
|
79 | 78 | */ |
80 | 79 | protected function port(InputInterface $input) { |
81 | 80 | $name = $input->getArgument('port'); |