protected function resolveInstallPath(array $paths, $name)
    {
        foreach ($paths as $path => $names) {
            if (in_array($name, $names, true) || in_array('type:' . static::TYPE, $names, true)) {
                return $path;
            }
        }

        return false;
    }
protected function resolveInstallPath(array $paths, $name)
    {
        foreach ($paths as $path => $names) {
            if (in_array($name, $names, true) || in_array('type:' . static::TYPE, $names, true)) {
                return $path;
            }
        }

        return false;
    }
protected function resolveInstallPath ( array $ paths , $ name ) { foreach ( $ paths as $ path => $ names ) { if ( in_array ( $ name , $ names , true ) || in_array ( 'type:' . static :: TYPE , $ names , true ) ) { return $ path ; } } return false ; }
Searches the install path based on a package name and a paths array.

@param array[] $paths A paths array.
@param string $name A package name.

@return string|bool The install path, or `false` if the path cannot be resolved.

@see https://github.com/composer/installers This code is based on the Composer Installer.
Searches the install path based on a package name and a paths array .