From 58d63c129b16c4f4f461755efde0ec7e86f8077d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 17 Nov 2013 17:55:11 +0100 Subject: cleansup --- class/FedoraClient.php | 38 ++++++++++---------------------------- class/FedoraPkgdb.php | 2 +- 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/class/FedoraClient.php b/class/FedoraClient.php index 7aa2bbb..4071348 100644 --- a/class/FedoraClient.php +++ b/class/FedoraClient.php @@ -27,9 +27,9 @@ * @category Main * @package FedoraClient * - * @author Remi Collet + * @author Remi Collet * @author Johan Cwiklinski - * @copyright 2010 Remi Collet + * @copyright 2010-2013 Remi Collet * @license http://www.gnu.org/licenses/lgpl-2.1.txt LGPL License 2.1 or (at your option) any later version * @link http://github.com/remicollet/rpmphp/ * @since The begining of times. @@ -72,19 +72,13 @@ abstract class FedoraClient $this->_agent = 'Fedora PHPClient/'.self::VERSION; } - $this->logDebug( - 3, - __CLASS__."::".__FUNCTION__.": agent='".$this->_agent."'" - ); + $this->logDebug(3, __METHOD__.": agent='".$this->_agent."'"); } function setUrl($url) { $this->url = $url; - $this->logDebug( - 3, - __CLASS__."::".__FUNCTION__.": url='$url'" - ); + $this->logDebug(3, __METHOD__.": url='$url'"); } function logDebug($level, $msg) @@ -120,10 +114,7 @@ abstract class FedoraClient ); // run the request - $this->logDebug( - 2, - __CLASS__."::".__FUNCTION__.": call '$url'" - ); + $this->logDebug(2, __METHOD__.": call '$url'"); curl_exec($curl); @@ -135,28 +126,22 @@ abstract class FedoraClient if ($http_status==401 || $http_status==403) { $this->logDebug( 1, - __CLASS__."::".__FUNCTION__. + __METHOD__. ": http_status '$http_status' Authentication failed logging in" ); return array(); } else if ($http_status>=400) { $this->logDebug( 1, - __CLASS__."::".__FUNCTION__. + __METHOD__. ": http_status '$http_status' Unknown HTTP Server Response" ); return array(); } else { - $this->logDebug( - 2, - __CLASS__."::".__FUNCTION__.": http_status '$http_status'" - ); + $this->logDebug(2, __METHOD__.": http_status '$http_status'"); } - $this->logDebug( - 2, - __CLASS__."::".__FUNCTION__.": close connexion" - ); + $this->logDebug(2, __METHOD__.": close connexion"); curl_close($curl); return json_decode($this->data, true); @@ -164,10 +149,7 @@ abstract class FedoraClient function receive($curl, $data) { - $this->logDebug( - 9, - __CLASS__."::".__FUNCTION__.": $data" - ); + $this->logDebug(9, __METHOD__.": $data"); $this->data .= $data; return strlen($data); } diff --git a/class/FedoraPkgdb.php b/class/FedoraPkgdb.php index da43986..1650493 100644 --- a/class/FedoraPkgdb.php +++ b/class/FedoraPkgdb.php @@ -27,7 +27,7 @@ * @category Main * @package FedoraClient * - * @author Remi Collet + * @author Remi Collet * @author Johan Cwiklinski * @copyright 2010-2013 Remi Collet * @license http://www.gnu.org/licenses/lgpl-2.1.txt LGPL License 2.1 or (at your option) any later version -- cgit