1 | <?php |
||
2 | /** |
||
3 | * Automation tool mixed with code generator for easier continuous development |
||
4 | * |
||
5 | * @link https://github.com/hiqdev/hidev |
||
6 | * @package hidev |
||
7 | * @license BSD-3-Clause |
||
8 | * @copyright Copyright (c) 2015-2018, HiQDev (http://hiqdev.com/) |
||
9 | */ |
||
10 | |||
11 | namespace hidev\console; |
||
12 | |||
13 | /** |
||
14 | * Goal for GitHub. |
||
15 | */ |
||
16 | class GithubController extends CommonController |
||
17 | { |
||
18 | /** |
||
19 | * Create the repo on GitHub. |
||
20 | * If name not given, repo for current project created. |
||
21 | * @param string $repo full name |
||
22 | * @return int exit code |
||
23 | */ |
||
24 | public function actionCreate(string $repo = null) |
||
25 | { |
||
26 | return $this->getComponent()->createRepo($repo); |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Clone repo from github. |
||
31 | * TODO this action must be run without `start`. |
||
32 | * @param string $repo full name vendor/package |
||
33 | * @return int exit code |
||
34 | */ |
||
35 | public function actionClone(string $repo) |
||
36 | { |
||
37 | return $this->getComponent()->cloneRepo($repo); |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * Checks if repo exists. |
||
42 | * @param string $repo full name vendor/package defaults to this repo name |
||
43 | * @return int exit code |
||
44 | */ |
||
45 | public function actionExists($repo = null) |
||
46 | { |
||
47 | return $this->getComponent()->existsRepo($repo); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * Creates github release for current project repo. |
||
52 | * @param string $release version number |
||
53 | */ |
||
54 | public function actionRelease($release = null) |
||
0 ignored issues
–
show
|
|||
55 | { |
||
56 | return $this->getComponent()->releaseRepo($repo); |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
|
|||
57 | } |
||
58 | |||
59 | public function getComponent() |
||
60 | { |
||
61 | return $this->take('github'); |
||
62 | } |
||
63 | } |
||
64 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.