Merge pull request #153 from grogy/parallel-lint
Added initial version of the PHP parallel lint plugin.
This commit is contained in:
commit
00ae1a1bfb
42
PHPCI/Plugin/PhpParallelLint.php
Normal file
42
PHPCI/Plugin/PhpParallelLint.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
* PHPCI - Continuous Integration for PHP
|
||||
*
|
||||
* @copyright Copyright 2013, Block 8 Limited.
|
||||
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
|
||||
* @link http://www.phptesting.org/
|
||||
*/
|
||||
|
||||
namespace PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Php Parallel Lint Plugin - Provides access to PHP lint functionality.
|
||||
* @author Vaclav Makes <vaclav@makes.cz>
|
||||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class PhpParallelLint implements \PHPCI\Plugin
|
||||
{
|
||||
protected $directory;
|
||||
protected $preferDist;
|
||||
protected $phpci;
|
||||
|
||||
public function __construct(\PHPCI\Builder $phpci, array $options = array())
|
||||
{
|
||||
$path = $phpci->buildPath;
|
||||
$this->phpci = $phpci;
|
||||
$this->directory = isset($options['directory']) ? $path . $options['directory'] : $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes parallel lint
|
||||
*/
|
||||
public function execute()
|
||||
{
|
||||
// build the parallel lint command
|
||||
$cmd = "run %s";
|
||||
|
||||
// and execute it
|
||||
return $this->phpci->executeCommand(PHPCI_BIN_DIR . $cmd, $this->directory);
|
||||
}
|
||||
}
|
|
@ -35,6 +35,7 @@
|
|||
"fabpot/php-cs-fixer" : "0.3.*@dev",
|
||||
"swiftmailer/swiftmailer" : "v5.0.0",
|
||||
"phploc/phploc": "*",
|
||||
"atoum/atoum":"*"
|
||||
"atoum/atoum":"*",
|
||||
"jakub-onderka/php-parallel-lint": "dev-master"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue