Renamed methods of Composer\Repository\PearRepository: fetchPearRepositories() to fetchPearPackages() and fetchPear2Repositories() to fetchPea2Packages().
parent
b62a90a981
commit
6c47d6efe2
|
@ -54,13 +54,13 @@ class PearRepository extends ArrayRepository
|
||||||
$link = $category->getAttribute("xlink:href");
|
$link = $category->getAttribute("xlink:href");
|
||||||
try {
|
try {
|
||||||
$packagesLink = str_replace("info.xml", "packagesinfo.xml", $link);
|
$packagesLink = str_replace("info.xml", "packagesinfo.xml", $link);
|
||||||
$this->fetchPear2Repositories($this->url . '/' . $packagesLink);
|
$this->fetchPear2Packages($this->url . '/' . $packagesLink);
|
||||||
} catch (\ErrorException $e) {
|
} catch (\ErrorException $e) {
|
||||||
if (false === strpos($e->getMessage(), '404')) {
|
if (false === strpos($e->getMessage(), '404')) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
$categoryLink = str_replace("info.xml", "packages.xml", $link);
|
$categoryLink = str_replace("info.xml", "packages.xml", $link);
|
||||||
$this->fetchPearRepositories($this->url . '/' . $categoryLink);
|
$this->fetchPearPackages($this->url . '/' . $categoryLink);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ class PearRepository extends ArrayRepository
|
||||||
* @throws ErrorException
|
* @throws ErrorException
|
||||||
* @throws InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
private function fetchPearRepositories($categoryLink)
|
private function fetchPearPackages($categoryLink)
|
||||||
{
|
{
|
||||||
$packagesXML = $this->requestXml($categoryLink);
|
$packagesXML = $this->requestXml($categoryLink);
|
||||||
$packages = $packagesXML->getElementsByTagName('p');
|
$packages = $packagesXML->getElementsByTagName('p');
|
||||||
|
@ -201,7 +201,7 @@ class PearRepository extends ArrayRepository
|
||||||
* @return void
|
* @return void
|
||||||
* @throws InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
private function fetchPear2Repositories($packagesLink)
|
private function fetchPear2Packages($packagesLink)
|
||||||
{
|
{
|
||||||
$loader = new ArrayLoader();
|
$loader = new ArrayLoader();
|
||||||
$packagesXml = $this->requestXml($packagesLink);
|
$packagesXml = $this->requestXml($packagesLink);
|
||||||
|
|
Loading…
Reference in New Issue