Adding Docblocks throughout the project and lowering the missing docblock limit in phpci.yml to zero.

Closes #692
This commit is contained in:
Dan Cryer 2014-12-08 11:25:33 +00:00
commit 7f9a09fa29
83 changed files with 1283 additions and 69 deletions

View file

@ -42,6 +42,10 @@ class PluginController extends \PHPCI\Controller
protected $canInstall;
protected $composerPath;
/**
* List all enabled plugins, installed and recommend packages.
* @return string
*/
public function index()
{
$this->requireAdmin();
@ -68,6 +72,9 @@ class PluginController extends \PHPCI\Controller
return $this->view->render();
}
/**
* Remove a given package.
*/
public function remove()
{
$this->requireAdmin();
@ -87,6 +94,9 @@ class PluginController extends \PHPCI\Controller
die;
}
/**
* Install a given package.
*/
public function install()
{
$this->requireAdmin();
@ -102,6 +112,10 @@ class PluginController extends \PHPCI\Controller
die;
}
/**
* Get the json-decoded contents of the composer.json file.
* @return mixed
*/
protected function getComposerJson()
{
$json = file_get_contents(APPLICATION_PATH . 'composer.json');
@ -124,6 +138,11 @@ class PluginController extends \PHPCI\Controller
file_put_contents(APPLICATION_PATH . 'composer.json', $json);
}
/**
* Find a system binary.
* @param $binary
* @return null|string
*/
protected function findBinary($binary)
{
if (is_string($binary)) {
@ -152,6 +171,9 @@ class PluginController extends \PHPCI\Controller
return null;
}
/**
* Perform a search on packagist.org.
*/
public function packagistSearch()
{
$searchQuery = $this->getParam('q', '');
@ -162,6 +184,9 @@ class PluginController extends \PHPCI\Controller
die(json_encode($res['body']));
}
/**
* Look up available versions of a given package on packagist.org
*/
public function packagistVersions()
{
$name = $this->getParam('p', '');