WordPress at a glance
function is not described

Composer\Installers

BaseInstaller::mapCustomInstallPaths() protected WC 1.0

Search through a passed paths array for a custom install path.

{} It's a method of the class: BaseInstaller{}

No Hooks.

Return

String|false. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->mapCustomInstallPaths( $paths, $name, $type, $vendor );
$paths(array) (required)
-
$name(string) (required)
-
$type(string) (required)
-
$vendor(string)
= NULL

Code of BaseInstaller::mapCustomInstallPaths() WC 5.2.2

<?php
protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
{
    foreach ($paths as $path => $names) {
        $names = (array) $names;
        if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
            return $path;
        }
    }

    return false;
}