From 8aa047b3f0d41b251d8f19ad6553485dc8ec6b8b Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Fri, 26 Apr 2013 19:56:08 +0200 Subject: [PATCH] Removed obsolete methods from the Utils class --- src/utils/Utils.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/utils/Utils.php b/src/utils/Utils.php index a38f53c00..8be7f1597 100644 --- a/src/utils/Utils.php +++ b/src/utils/Utils.php @@ -25,12 +25,6 @@ the Free Software Foundation, either version 3 of the License, or */ - -if(!defined("HEX2BIN")){ - @define("HEX2BIN", false); -} - - define("BIG_ENDIAN", 0x00); define("LITTLE_ENDIAN", 0x01); define("ENDIANNESS", (pack("d", 1) === "\77\360\0\0\0\0\0\0" ? BIG_ENDIAN:LITTLE_ENDIAN)); @@ -348,10 +342,6 @@ class Utils{ return array("yaw" => $hAngle, "pitch" => $vAngle); } - public static function microtime(){ - return microtime(true); - } - public static function curl_get($page, $timeout = 10){ if(Utils::$online === false){ return false; @@ -393,10 +383,7 @@ class Utils{ } public static function hexToStr($hex){ - if(HEX2BIN === true){ - return hex2bin($hex); - } - return pack("H*" , $hex); + return hex2bin($hex); } public static function readBool($b){ @@ -554,7 +541,7 @@ class Utils{ }else{ $negative = false; } - while(bccomp($value, '0', 0) > 0){ + while(bccomp($value, "0", 0) > 0){ $temp = bcmod($value, "16777216"); $x = chr($temp >> 16) . chr($temp >> 8) . chr($temp) . $x; $value = bcdiv($value, "16777216", 0);