protected function findPackageKey($package_name)
    {
        $package_key = null;
        // In most cases the package name is already used as the array key.
        if (isset(static::$packageToCleanup[$package_name])) {
            $package_key = $package_name;
        } else {
            // Handle any mismatch in case between the package name and array key.
            // For example, the array key 'mikey179/vfsStream' needs to be found
            // when composer returns a package name of 'mikey179/vfsstream'.
            foreach (static::$packageToCleanup as $key => $dirs) {
                if (strtolower($key) === $package_name) {
                    $package_key = $key;
                    break;
                }
            }
        }
        return $package_key;
    }
protected function findPackageKey($package_name)
    {
        $package_key = null;
        // In most cases the package name is already used as the array key.
        if (isset(static::$packageToCleanup[$package_name])) {
            $package_key = $package_name;
        } else {
            // Handle any mismatch in case between the package name and array key.
            // For example, the array key 'mikey179/vfsStream' needs to be found
            // when composer returns a package name of 'mikey179/vfsstream'.
            foreach (static::$packageToCleanup as $key => $dirs) {
                if (strtolower($key) === $package_name) {
                    $package_key = $key;
                    break;
                }
            }
        }
        return $package_key;
    }
protected function findPackageKey ( $ package_name ) { $ package_key = null ; // In most cases the package name is already used as the array key. if ( isset ( static :: $ packageToCleanup [ $ package_name ] ) ) { $ package_key = $ package_name ; } else { // Handle any mismatch in case between the package name and array key. // For example, the array key 'mikey179/vfsStream' needs to be found // when composer returns a package name of 'mikey179/vfsstream'. foreach ( static :: $ packageToCleanup as $ key => $ dirs ) { if ( strtolower ( $ key ) === $ package_name ) { $ package_key = $ key ; break ; } } } return $ package_key ; }
Find the array key for a given package name with a case-insensitive search.

@param string $package_name
The package name from composer. This is always already lower case.

@return string|null
The string key, or NULL if none was found.
Find the array key for a given package name with a case - insensitive search .