Refactored plugins
This commit is contained in:
parent
1a3a0a1993
commit
16a5add859
45 changed files with 404 additions and 1224 deletions
|
|
@ -21,36 +21,29 @@ use PHPCensor\Plugin;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Phing implements Plugin
|
||||
class Phing extends Plugin
|
||||
{
|
||||
|
||||
private $directory;
|
||||
private $buildFile = 'build.xml';
|
||||
private $targets = ['build'];
|
||||
private $properties = [];
|
||||
private $propertyFile;
|
||||
|
||||
protected $phpci;
|
||||
protected $build;
|
||||
protected $directory;
|
||||
protected $buildFile = 'build.xml';
|
||||
protected $targets = ['build'];
|
||||
protected $properties = [];
|
||||
protected $propertyFile;
|
||||
|
||||
/**
|
||||
* Set up the plugin, configure options, etc.
|
||||
* @param Builder $phpci
|
||||
* @param Build $build
|
||||
* @param array $options
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function __construct(Builder $phpci, Build $build, array $options = [])
|
||||
{
|
||||
$this->setPhpci($phpci);
|
||||
$this->build = $build;
|
||||
parent::__construct($phpci, $build, $options);
|
||||
|
||||
/*
|
||||
* Set working directory
|
||||
*/
|
||||
if (isset($options['directory'])) {
|
||||
$directory = $phpci->buildPath . DIRECTORY_SEPARATOR . $options['directory'];
|
||||
$directory = $this->phpci->buildPath . DIRECTORY_SEPARATOR . $options['directory'];
|
||||
} else {
|
||||
$directory = $phpci->buildPath;
|
||||
$directory = $this->phpci->buildPath;
|
||||
}
|
||||
|
||||
$this->setDirectory($directory);
|
||||
|
|
@ -97,24 +90,6 @@ class Phing implements Plugin
|
|||
return $this->phpci->executeCommand(implode(' ', $cmd), $this->directory, $this->targets);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \PHPCensor\Builder
|
||||
*/
|
||||
public function getPhpci()
|
||||
{
|
||||
return $this->phpci;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \PHPCensor\Builder $phpci
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPhpci($phpci)
|
||||
{
|
||||
$this->phpci = $phpci;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue