function Plugin::getPHPCodeSnifferPackage
Searches for the installed PHP_CodeSniffer Composer package
Parameters
null|string|\Composer\Semver\Constraint\ConstraintInterface $versionConstraint to match against:
Return value
PackageInterface|null
2 calls to Plugin::getPHPCodeSnifferPackage()
- Plugin::getPHPCodeSnifferInstallPath in vendor/
dealerdirect/ phpcodesniffer-composer-installer/ src/ Plugin.php - Returns the path to the PHP_CodeSniffer package installation location
- Plugin::isPHPCodeSnifferInstalled in vendor/
dealerdirect/ phpcodesniffer-composer-installer/ src/ Plugin.php - Simple check if PHP_CodeSniffer is installed.
File
-
vendor/
dealerdirect/ phpcodesniffer-composer-installer/ src/ Plugin.php, line 539
Class
- Plugin
- PHP_CodeSniffer standard installation manager.
Namespace
PHPCSStandards\Composer\Plugin\Installers\PHPCodeSnifferCode
private function getPHPCodeSnifferPackage($versionConstraint = null) {
$packages = $this->composer
->getRepositoryManager()
->getLocalRepository()
->findPackages(self::PACKAGE_NAME, $versionConstraint);
return array_shift($packages);
}