Make helper methods strToHex and hexToStr in ContentProxyTest.php private

to prevent misusage (from outside this class)
This commit is contained in:
Tobi823 2018-09-21 13:31:28 +02:00
parent 7a65c2017b
commit d64139d812

View file

@ -744,7 +744,7 @@ class ContentProxyTest extends TestCase
* @param $string * @param $string
* @return string * @return string
*/ */
function strToHex($string){ private function strToHex($string){
$hex = ''; $hex = '';
for ($i=0; $i<strlen($string); $i++){ for ($i=0; $i<strlen($string); $i++){
$ord = ord($string[$i]); $ord = ord($string[$i]);
@ -759,7 +759,7 @@ class ContentProxyTest extends TestCase
* @param $hex * @param $hex
* @return string * @return string
*/ */
function hexToStr($hex){ private function hexToStr($hex){
$string=''; $string='';
for ($i=0; $i < strlen($hex)-1; $i+=2){ for ($i=0; $i < strlen($hex)-1; $i+=2){
$string .= chr(hexdec($hex[$i].$hex[$i+1])); $string .= chr(hexdec($hex[$i].$hex[$i+1]));