From 3b9b93ab380ab005f71cd14f85d27c87f3c64b0d Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Tue, 17 May 2016 23:11:52 +0200 Subject: [PATCH] tweeper.php: rename getContents to getUrlContents and getInfo to getUrlInfo The new names should be more explicative. --- tweeper.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tweeper.php b/tweeper.php index 7630e0a..36bf085 100644 --- a/tweeper.php +++ b/tweeper.php @@ -67,7 +67,7 @@ class Tweeper { /** * Get the contents from a URL. */ - private static function getContents($url) { + private static function getUrlContents($url) { $ch = curl_init($url); curl_setopt_array($ch, array( CURLOPT_HEADER => FALSE, @@ -88,7 +88,7 @@ class Tweeper { /** * Get the headers from a URL. */ - private static function getInfo($url) { + private static function getUrlInfo($url) { $ch = curl_init($url); curl_setopt_array($ch, array( CURLOPT_HEADER => TRUE, @@ -133,7 +133,7 @@ class Tweeper { // See http://sourceforge.net/p/feedvalidator/bugs/72/ $http_url = preg_replace("/^https/", "http", $url); - $url_info = Tweeper::getInfo($http_url); + $url_info = Tweeper::getUrlInfo($http_url); $supported = in_array($url_info['content_type'], $supported_content_types); if (!$supported) { @@ -196,7 +196,7 @@ class Tweeper { return NULL; } - $stylesheet_contents = $this->getContents($stylesheet); + $stylesheet_contents = $this->getUrlContents($stylesheet); $xslDoc = new DOMDocument(); $xslDoc->loadXML($stylesheet_contents); @@ -310,7 +310,7 @@ class Tweeper { return NULL; } - $html = $this->getContents($src_url); + $html = $this->getUrlContents($src_url); if (FALSE === $html) { return NULL; } -- 2.1.4