From 12ee81a888f64755f00c931fbfd30ed279ceb40a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Make=C5=A1?= Date: Fri, 20 Sep 2013 12:57:23 +0200 Subject: [PATCH] Added initial version of the PHP parallel lint plugin. --- PHPCI/Plugin/PhpParallelLint.php | 42 ++++++++++++++++++++++++++++++++ composer.json | 3 ++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 PHPCI/Plugin/PhpParallelLint.php diff --git a/PHPCI/Plugin/PhpParallelLint.php b/PHPCI/Plugin/PhpParallelLint.php new file mode 100644 index 00000000..dc880a5c --- /dev/null +++ b/PHPCI/Plugin/PhpParallelLint.php @@ -0,0 +1,42 @@ + +* @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); + } +} diff --git a/composer.json b/composer.json index a45bd0e8..858a3284 100644 --- a/composer.json +++ b/composer.json @@ -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" } }