/**
* Get the second part of the regular expression to check for support of a
* package type
*/
protected function getLocationPattern(string
$frameworkType): string
{ $pattern = null;
if (!
empty($this->supportedTypes
[$frameworkType])) { $frameworkClass = 'Composer\\Installers\\' .
$this->supportedTypes
[$frameworkType];
/** @var BaseInstaller $framework */
$framework =
new $frameworkClass(new Package('dummy/pkg', '1.0.0.0', '1.0.0'
),
$this->composer,
$this->
getIO());
$locations =
array_keys($framework->
getLocations($frameworkType));
if ($locations) { $pattern = '(' .
implode('|',
$locations) . ')';
} } return $pattern ?: '(\w+)';
} private function getIO(): IOInterface
{