Added findBinary, fixes #115
This commit is contained in:
parent
f7e466bdb1
commit
0c8d9c0f74
12 changed files with 112 additions and 33 deletions
|
|
@ -105,7 +105,14 @@ class PhpCodeSniffer implements \PHPCI\Plugin
|
|||
$encoding = ' --encoding='.$this->encoding;
|
||||
}
|
||||
|
||||
$cmd = PHPCI_BIN_DIR . 'phpcs %s %s %s %s %s "%s"';
|
||||
$phpcs = $this->phpci->findBinary('phpcs');
|
||||
|
||||
if (!$phpcs) {
|
||||
$this->phpci->logFailure('Could not find phpcs.');
|
||||
return false;
|
||||
}
|
||||
|
||||
$cmd = $phpcs . ' %s %s %s %s %s "%s"';
|
||||
$success = $this->phpci->executeCommand($cmd, $standard, $suffixes, $ignore, $tab_width, $encoding, $this->phpci->buildPath . $this->path);
|
||||
|
||||
$output = $this->phpci->getLastOutput();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue