for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Rougin\Refinery\Commands;
use CI_Controller;
use Twig_Environment;
use Symfony\Component\Console\Command\Command;
use Rougin\Describe\Describe;
/**
* Abstract Command
*
* Extends the Symfony\Console\Command class with Twig's renderer,
* CodeIgniter's instance and Describe.
* @package Refinery
* @author Rougin Royce Gutib <[email protected]>
*/
abstract class AbstractCommand extends Command
{
* @var \Rougin\Describe\Describe
protected $describe;
* @var \Twig_Environment
protected $renderer;
* @var \CI_Controller
protected $codeigniter;
* @param \CI_Controller $controller
$controller
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter $italy is not defined by the method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
* @param \Rougin\Describe\Describe $describe
* @param \Twig_Environment $renderer
public function __construct(CI_Controller $codeigniter, Describe $describe, Twig_Environment $renderer)
parent::__construct();
$this->codeigniter = $codeigniter;
$this->describe = $describe;
$this->renderer = $renderer;
}
* Checks whether the command is enabled or not in the current environment.
* @return bool
public function isEnabled()
$migrations = glob(APPPATH . 'migrations/*.php');
return count($migrations) > 0;
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.