for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Automation tool mixed with code generator for easier continuous development
*
* @link https://github.com/hiqdev/hidev
* @package hidev
* @license BSD-3-Clause
* @copyright Copyright (c) 2015-2018, HiQDev (http://hiqdev.com/)
*/
namespace hidev\console;
* Goal for GitHub.
class GithubController extends CommonController
{
* Create the repo on GitHub.
* If name not given, repo for current project created.
* @param string $repo full name
* @return int exit code
public function actionCreate(string $repo = null)
return $this->getComponent()->createRepo($repo);
}
* Clone repo from github.
* TODO this action must be run without `start`.
* @param string $repo full name vendor/package
public function actionClone(string $repo)
return $this->getComponent()->cloneRepo($repo);
* Checks if repo exists.
* @param string $repo full name vendor/package defaults to this repo name
public function actionExists($repo = null)
return $this->getComponent()->existsRepo($repo);
* Creates github release for current project repo.
* @param string $release version number
public function actionRelease($release = null)
$release
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function actionRelease(/** @scrutinizer ignore-unused */ $release = null)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return $this->getComponent()->releaseRepo($repo);
$repo
public function getComponent()
return $this->take('github');
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.