PhpParallelLint andPhpCpd now implements ZeroConfigPlugin interface
This commit is contained in:
parent
eea29dabe8
commit
a5aabdce2d
33 changed files with 188 additions and 117 deletions
|
|
@ -14,14 +14,16 @@ use PHPCensor\Helper\Lang;
|
|||
use PHPCensor\Model\Build;
|
||||
use PHPCensor\Model\BuildError;
|
||||
use PHPCensor\Plugin;
|
||||
use PHPCensor\ZeroConfigPlugin;
|
||||
|
||||
/**
|
||||
* PHP Copy / Paste Detector - Allows PHP Copy / Paste Detector testing.
|
||||
* @author Dan Cryer <dan@block8.co.uk>
|
||||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class PhpCpd extends Plugin
|
||||
* PHP Copy / Paste Detector - Allows PHP Copy / Paste Detector testing.
|
||||
*
|
||||
* @author Dan Cryer <dan@block8.co.uk>
|
||||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class PhpCpd extends Plugin implements ZeroConfigPlugin
|
||||
{
|
||||
protected $directory;
|
||||
protected $args;
|
||||
|
|
@ -56,6 +58,24 @@ class PhpCpd extends Plugin
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if this plugin can be executed.
|
||||
*
|
||||
* @param $stage
|
||||
* @param Builder $builder
|
||||
* @param Build $build
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function canExecute($stage, Builder $builder, Build $build)
|
||||
{
|
||||
if ($stage == 'test') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs PHP Copy/Paste Detector in a specified directory.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue