Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Plugin.php

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\PHPCodeSniffer

Code

private function getPHPCodeSnifferPackage($versionConstraint = null) {
    $packages = $this->composer
        ->getRepositoryManager()
        ->getLocalRepository()
        ->findPackages(self::PACKAGE_NAME, $versionConstraint);
    return array_shift($packages);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal