function Plugin::getPhpcsCommand
Get the command to call PHPCS.
2 calls to Plugin::getPhpcsCommand()
- Plugin::loadInstalledPaths in vendor/
dealerdirect/ phpcodesniffer-composer-installer/ src/ Plugin.php - Load all paths from PHP_CodeSniffer into an array.
- Plugin::saveInstalledPaths in vendor/
dealerdirect/ phpcodesniffer-composer-installer/ src/ Plugin.php - Save all coding standard paths back into PHP_CodeSniffer
File
-
vendor/
dealerdirect/ phpcodesniffer-composer-installer/ src/ Plugin.php, line 354
Class
- Plugin
- PHP_CodeSniffer standard installation manager.
Namespace
PHPCSStandards\Composer\Plugin\Installers\PHPCodeSnifferCode
protected function getPhpcsCommand() {
// Determine the path to the main PHPCS file.
$phpcsPath = $this->getPHPCodeSnifferInstallPath();
if (file_exists($phpcsPath . '/bin/phpcs') === true) {
// PHPCS 3.x.
$phpcsExecutable = './bin/phpcs';
}
else {
// PHPCS 2.x.
$phpcsExecutable = './scripts/phpcs';
}
return vsprintf('%s %s', array(
'php executable' => $this->getPhpExecCommand(),
'phpcs executable' => $phpcsExecutable,
));
}