Total Complexity | 5 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
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) |
||
|
|||
55 | { |
||
56 | return $this->getComponent()->releaseRepo($repo); |
||
57 | } |
||
58 | |||
59 | public function getComponent() |
||
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.